diff --git a/.bzrignore b/.bzrignore index 29a8142..0cfc4e1 100644 --- a/.bzrignore +++ b/.bzrignore @@ -22,5 +22,6 @@ scripts/wicd scripts/wicd-client scripts/wicd-curses translations/* +wicd/wicd-daemon.py wicd/wpath.py *tags diff --git a/wicd/wicd-daemon.py b/in/wicd=wicd-daemon.py.in similarity index 99% rename from wicd/wicd-daemon.py rename to in/wicd=wicd-daemon.py.in index 24289ed..32abcbe 100644 --- a/wicd/wicd-daemon.py +++ b/in/wicd=wicd-daemon.py.in @@ -1671,9 +1671,13 @@ def main(argv): output = ManagedStdio(logpath) if os.path.exists(logpath): try: - os.chmod(logpath, 0600) + os.chmod(logpath, %LOGPERMS%) + if "%LOGGROUP%": + import grp + group = grp.getgrnam("%LOGGROUP%") + os.chown(logpath, 0, group[2]) except: - print 'unable to chmod log file to 0600' + print 'unable to chmod log file to %LOGPERMS%' if redirect_stdout: sys.stdout = output if redirect_stderr: sys.stderr = output diff --git a/in/wicd=wpath.py.in b/in/wicd=wpath.py.in index d1fbbc1..b441ba5 100755 --- a/in/wicd=wpath.py.in +++ b/in/wicd=wpath.py.in @@ -62,6 +62,8 @@ initfile = '%INITFILE%' # stores only the file name, i.e. wicd initfilename = '%INITFILENAME%' wicd_group = '%WICDGROUP%' +log_group = '%LOGGROUP%' +log_perms = '%LOGPERMS%' # BOOLEANS no_install_pmutils = %NO_INSTALL_PMUTILS% diff --git a/setup.py b/setup.py index c2f67cc..13508b8 100755 --- a/setup.py +++ b/setup.py @@ -242,6 +242,8 @@ class configure(Command): self.no_install_acpi = True elif self.distro in ['debian']: self.wicdgroup = "netdev" + self.loggroup = "adm" + self.logperms = "0640" self.init = '/etc/init.d/' self.initfile = 'init/debian/wicd' elif self.distro in ['arch']: