Permalink
Browse files

Set group of scripts on install, use group name from auth.py for conf…

…ig files
  • Loading branch information...
simoncadman committed Jan 16, 2013
1 parent 669ede3 commit 727b4bb362591c62d1716bf3070998a3c852ceae
Showing with 4 additions and 2 deletions.
  1. +1 −0 Makefile.in
  2. +3 −2 auth.py
View
@@ -27,4 +27,5 @@ install: all
mkdir -p $(DESTDIR)/var/log/cups/
touch $(DESTDIR)/var/log/cups/cloudprint_log
chown root:${cupsgroup} $(DESTDIR)/var/log/cups/cloudprint_log
+ chown -R root:${cupsgroup} ${prefix}/lib/cloudprint-cups/
chmod 660 $(DESTDIR)/var/log/cups/cloudprint_log
View
@@ -66,6 +66,8 @@ def SetupAuth(interactive=False):
requestor, storage: Authenticated requestors and an instance of storage
"""
modifiedconfig = False
+ filedetails = os.stat(__file__)
+ lpid = filedetails.st_gid
# parse config file and extract useragents, which we use for account names
userids = []
@@ -109,9 +111,8 @@ def SetupAuth(interactive=False):
# fix permissions
if modifiedconfig: # pragma: no cover
os.chmod(Auth.config, 0640)
- lpid = grp.getgrnam('lp').gr_gid
os.chown(Auth.config, 0, lpid)
return requestors, storage
- SetupAuth = staticmethod(SetupAuth)
+ SetupAuth = staticmethod(SetupAuth)

0 comments on commit 727b4bb

Please sign in to comment.