tag 158792 +patch thanks Hi,
I was able to easily reproduce the bug. You only have to: ---------------------------------- 8< ---------------------------------- velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# umask 0022 velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# umask 0077 velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# /usr/sbin/dhelp_parse -r velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# ls /usr/share/doc/HTML/ | head total 68 drwx------ 2 root root 4096 2005-09-03 20:41 admin/ drwx------ 2 root root 4096 2005-09-03 20:41 debian/ drwx------ 2 root root 4096 2005-09-03 20:41 graphics/ -rw------- 1 root root 2782 2005-09-03 20:41 index.html drwx------ 2 root root 4096 2005-09-03 20:41 math/ drwx------ 2 root root 4096 2005-09-03 20:41 misc/ drwx------ 2 root root 4096 2005-09-03 20:41 net/ drwx------ 2 root root 4096 2005-09-03 20:41 programming/ -rw------- 1 root root 144 2005-09-03 20:41 README velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# ./dhelp_parse -r # Patched velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# ls /usr/share/doc/HTML/ | head total 68 drwxr-xr-x 2 root root 4096 2005-09-03 20:42 admin/ drwxr-xr-x 2 root root 4096 2005-09-03 20:42 debian/ drwxr-xr-x 2 root root 4096 2005-09-03 20:42 graphics/ -rw-r--r-- 1 root root 2782 2005-09-03 20:42 index.html drwxr-xr-x 2 root root 4096 2005-09-03 20:42 math/ drwxr-xr-x 2 root root 4096 2005-09-03 20:42 misc/ drwxr-xr-x 2 root root 4096 2005-09-03 20:42 net/ drwxr-xr-x 2 root root 4096 2005-09-03 20:42 programming/ -rw-r--r-- 1 root root 144 2005-09-03 20:42 README velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# umask 0077 velutha:/home/zoso/src/debian/dhelp/dhelp-0.5.21# ---------------------------------- >8 ---------------------------------- Find attached a micro-patch to set a sane umask before proceeding. It works for me (TM). Regards, -- Esteban Manchado Velázquez <[EMAIL PROTECTED]> - http://www.foton.es EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
--- dhelp_parse.c-orig 2005-09-03 20:33:44.652199016 +0100 +++ dhelp_parse.c 2005-09-03 20:38:35.120041192 +0100 @@ -786,6 +786,10 @@ return (1); } + /* set a sane umask, as we're probably going to generate system-wide files + * that must be readable (documentation and all of that) */ + umask(0022); + if (!strcmp (argv[1], "-r")) { remove (DBNAME); /* loesche db, um alte/falsche Eintraege