[torqueusers] suppressing output using /dev/null causes null to be removed

Ari Pollak aripollak at gmail.com
Fri Apr 18 10:24:36 MDT 2008


I just tried specifying -o /dev/null to qsub under torque 2.3.0, and
it seems the old behavior is still present - /dev/null gets removed &
created as a normal file.. I guess the check below happens too late,
and the file still gets created. I'm sort of worried about the
implications of this, since it means random people can accidentally
overwrite stuff in /dev.

2007/11/26 Garrick Staples <garrick at usc.edu>:

>  Fixes are checked into 2.1-fixes, 2.2-fixes, and trunk.  The patch is simple enough.
>
>  Index: src/resmom/requests.c
>  ===================================================================
>  --- src/resmom/requests.c       (revision 1657)
>  +++ src/resmom/requests.c       (working copy)
>  @@ -595,6 +595,11 @@
>
>    filename = std_file_name(pjob,which,&amt); /* amt is place holder */
>
>  +  if (strcmp(filename,"/dev/null") == 0)
>  +    {
>  +    return(0);
>  +    }
>  +
>    fds = open(filename,O_RDONLY,0);
>
>    if (fds < 0)
>


More information about the torqueusers mailing list