Bug 90657 - dictd's initrc script don't take care of umask
Bug#: 90657 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: app-dicts@gentoo.org Reported By: etienne.buira@free.fr
Component: Server
URL: 
Summary: dictd's initrc script don't take care of umask
Keywords:  
Status Whiteboard: 
Opened: 2005-04-27 13:56 0000
Description:   Opened: 2005-04-27 13:56 0000
When listing the dictionnaries, a new file is created (with the current umask).
As result, when having umask=0077, the file is not readable by dictd.

To get rid of that, I declared DICTDCONF_MOD, which hold the chmod(1) argument.
If DICTDCONF_MOD is not defined, nothing more happens.

I'll attach the patch

Reproducible: Always
Steps to Reproduce:
1.Make sure dictd is not running
2.# /etc/init.d/dictd start

Actual Results:  
 * Re-caching dependency info (mtimes differ)...
 * Starting dictd...
 * Scanning for dictionaries...
 * Done, 4 dictionary indexes found.
:E: /etc/dict/dictd.conf is not readable (config file)
/sbin/runscript.sh: line 532: 15986 Segmentation Fault  start-stop-daemon
--start --quiet --exec /usr/sbin/dictd -- $EARGS                               
                                                [ !! ]

Expected Results:  
 * Starting dictd...
 * Scanning for dictionaries...
 * Changing mod
 * Done, 4 dictionary indexes found.                                           

                                              [ ok ]

------- Comment #1 From BUIRA Etienne 2005-04-27 13:58:05 0000 -------
Created an attachment (id=57437) [details]
Patch to chmod the conf file after listing dicts

------- Comment #2 From BUIRA Etienne 2005-04-27 13:59:33 0000 -------
(From update of attachment 57437 [details])
Patch to chmod the conf file after listing dicts

------- Comment #3 From Wulf Krueger (RETIRED) 2007-08-18 01:17:33 0000 -------
Fixed in dictd-1.10.9.

------- Comment #4 From Peter Volkov 2008-09-12 19:13:10 0000 -------
BUIRA I'm dropping DICTDCONF_MOD from conf.d/dictd file and make initrc script
itself check and set correct permissions. If you still using dictd, please,
give dictd-1.10.11-r1.ebuild a try. Thank you.