|
Bugzilla – Full Text Bug Listing |
| Summary: | Argument list too long errors | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | steve |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | low | ||
| Priority: | normal | ||
| Version: | 1.6.3 | ||
| Hardware: | PC | ||
| OS: | OpenBSD | ||
|
Description
steve
2001-10-27 14:09:30 MDT
Sudo does not have an arbitrary limit on the length of command line arguments. This error is most likely coming from the kernel (execvp is returning E2BIG) before sudo is even run. I suspect if you run the ls w/o sudo and are careful to make sure /bin/ls is being run and not a shell builtin you will get the same behavior. I use tcsh, which has a builtin ls. I was able to do an ls of all my mail messages in all folders using the tcsh builtin ls but doing "sudo ls Mail/*/*" or /bin/ls Mail/*/*" yielded the dreaded "Argument list too long". The kernel does impose a limit to the size of the arguments passed to the exec() family of functions (ARG_MAX, 256KB on OpenBSD) and that is what you are running up against. The workaround is to use xargs(1). |