On 2005-10-30 Bernd Zeimetz <[EMAIL PROTECTED]> wrote:
> > Is this repeatable? i.e. could you show me something like
> > 1 do this
> > 2 do that
> > 3 same error occurs everytime

> sure.
[...]
>     dh_fixperms
> xargs: chown: Argument list too long
> dh_fixperms: command returned error code

> Aborted (dh_fixperms).
[...]
> [EMAIL PROTECTED]:/tmp$ uname -a
> Linux one 2.6.11.12-grsec #1 Sun Oct 30 01:40:25 CEST 2005 x86_64 GNU/Linux
[...]

Hello,
I suspect grsec to somehow be at fault.

I've built a small ugly program testexec which invokes
/bin/true (number given to testexec as argument) times 0
i.e.
testexec 5
invokes
/bin/true 00000

On both my system and pergolesi (Debian's AMD64 machine) it is easy to
find a number n so that
testexec n
succeeds and
testexec n+1
*reproducibly* fails with E2BIG. And n is approximately[1]
(getconf ARG_MAX)-sizeofenvironment-(strlen(/bin/true)+1)-15

<quote>
[EMAIL PROTECTED]:~$ for i in `seq -w 1 1000` ;do ./testexec 130654 || break ;d
one ; echo $i
1000
[EMAIL PROTECTED]:~$ for i in `seq -w 1 1000` ;do ./testexec 130655 || break ;d
one ; echo $i
Argument list too long
0001
[EMAIL PROTECTED]:~$ echo $((`getconf ARG_MAX`-`printenv | wc -m`))
130676
<unquote>

This looks quite similar on my own system. However "one", your system,
which is using grsec behaves erratically:
<quote>
[EMAIL PROTECTED]:~$ echo $((`getconf ARG_MAX`-`printenv | wc -m`))
129968
[EMAIL PROTECTED]:~$ for i in `seq -w 1 1000` ;do ./testexec 125860 || break 
;done ; echo $i
Argument list too long
0350
[EMAIL PROTECTED]:~$ for i in `seq -w 1 1000` ;do ./testexec 125860 || break 
;done ; echo $i
Argument list too long
0302
[EMAIL PROTECTED]:~$ for i in `seq -w 1 1000` ;do ./testexec 125860 || break 
;done ; echo $i
Argument list too long
0710
<unquote>

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).

* The behavior is erratic. The same command-line with identical
  environment will fail sometimes and sometimes not.

            cu andreas

[1] The "-15" varies, I guess because the basic execution modifies the
environment.
-- 
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken.                                (c) Jasper Ffforde


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to