[grsec] Fwd: Re: Bug#336461: debhelper: dh_fixperms - xargs:
chown: Argument list too long
Bernd Zeimetz
bernd at bzed.de
Tue Nov 8 21:49:09 EST 2005
Hi.
> not accounted for in the environment. i thought of a quick workaround,
> i'd appreciate if you gave it a try (patch might be whitespace damaged):
I've applied the patch - here're the results:
> Please note two things:
> * There is a huge gap of more than 4KB between
> (getconf ARG_MAX)-(printenv | wc -m) (equals 129968) and the really
> usable number of arguments (about 125860).
this looks much better now. xargs works again in the case I had the problem
with it originally.
From the source of xargs:
/* IEE Std 1003.1, 2003 specifies that the combined argument and
* environment list shall not exceed {ARG_MAX}-2048 bytes. It also
* specifies that it shall be at least LINE_MAX.
*/
and they take care of that rule. So I think your workaround should fix it, or
did I calc something wrong!?
back to the test program from Andres Metzler -
one:/tmp# echo $((`getconf ARG_MAX`-`printenv | wc -m`))
130124
for $((`getconf ARG_MAX`-`printenv | wc -m` -15 )) it seems to work reliable
now.
one:/tmp# for i in `seq -w 1 1000` ;do ./testexec 130109 || break ;done; echo
$i
1000
one:/tmp# for i in `seq -w 1 1000` ;do ./testexec 130109 || break ;done; echo
$i
1000
[....]
Thanks a lot for the patch, please let me know if you're going to
change/test/patch anything else related to this problem.
Bernd
More information about the grsecurity
mailing list