|
Bugzilla – Full Text Bug Listing |
| Summary: | bash process substitution fails | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Martijn Ras <Martijn.Ras> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | ||
| Priority: | low | ||
| Version: | 1.6.9 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Martijn Ras
2007-09-24 10:38:15 MDT
This is not a bug. Both the redirection and the substitution are done by the shell before sudo is even run. Now, in this case bash is running "sudo /dev/fd/63" after opening file descriptor 63. The reason this fails is that as part of its sanity checks, sudo closes file descriptors other than 1, 2, and 3 when starting. In sudo 1.7 (still in alpha) it will be possible to control this behavior. However, "sudo cat <(ls -al)" seeme like an odd way to do things. Is there really any reason to not just do "sudo ls -al"? I suppose "sudo ls -al | cat" or "cat <(sudo ls -al)" would work too but I just don't see the reason for using cat in this case. |