Use find instead of -R for recursive setfacl (#16340)

(-R is not present on Solaris or freebsd setfacl)

Fixes #16322
pull/16362/head
Toshio Kuratomi 9 years ago committed by Toshio Kuratomi
parent 552172b141
commit 9d91d2c6b8

@ -90,10 +90,11 @@ class ShellBase(object):
mode = pipes.quote(mode)
user = pipes.quote(user)
cmd = ['setfacl']
cmd = ['setfacl', '-m', 'u:%s:%s' % (user, mode)]
if recursive:
cmd.append('-R')
cmd.extend(('-m', 'u:%s:%s %s' % (user, mode, path)))
cmd = ['find', path, '-exec'] + cmd + ["'{}'", "';'"]
else:
cmd.append(path)
return ' '.join(cmd)

Loading…
Cancel
Save