-   Linux - Software (
-   -   [bash] sudo: preserve non-std file descriptors (

DieZwiebel 02-27-2012 10:18 AM

[bash] sudo: preserve non-std file descriptors
Long story short: why isn't this (simplified) sample working?


root:# sudo -C 3 -u regular-user cat /dev/fd/3 3< /var/log/syslog
cat: /dev/fd/3: No Such file or directory

There is a file that contains


Defaults closefrom_override
in my /etc/sudoers.d

I am using bash 4.2.20 and Debian Wheezy

Thank you so much for your help!

catkin 02-27-2012 10:41 AM

AFAIK the special file name /dev/fd/3 can only be used in redirections. If that is correct it cannot be used as an argument to cat. Maybe cat </dev/fd/3 would work.

All times are GMT -5. The time now is 07:02 PM.