Commit 6a2b58f5 authored by Julien Muchembled's avatar Julien Muchembled

Don't spawn too many subprocesses in chownDirectory()

parent 062aebea
...@@ -53,10 +53,10 @@ def chownDirectory(path, uid, gid): ...@@ -53,10 +53,10 @@ def chownDirectory(path, uid, gid):
if os.getuid() != 0: if os.getuid() != 0:
# we are probably inside of a webrunner # we are probably inside of a webrunner
return return
# find /opt/slapgrid -not -user 1000 -exec chown slapsoft:slapsoft {} \; # find /opt/slapgrid -not -user 1000 -exec chown slapsoft:slapsoft {} +
subprocess.check_call([ subprocess.check_call([
'/usr/bin/find', path, '-not', '-user', str(uid), '-exec', '/usr/bin/find', path, '-not', '-user', str(uid), '-exec',
'/bin/chown', '%s:%s' % (uid, gid), '{}', ';' '/bin/chown', '%s:%s' % (uid, gid), '{}', '+'
]) ])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment