Thanks for this report!  As it turns out, this is just procmail
attempting to work around the exact issue (strict NFS).  If it were to
actually open the rc file as root, it would close it and reopen after
dropping privileges:

/*
 *      if we happen to be still running as root, and the rcfile
 *      is mounted on a secure NFS-partition, we might not be able
 *      to access it, so check if we can stat it or don't need any
 *      sgid privileges, if yes, drop all privs and set uid to
 *      the recipient beforehand
 */
static int tryopen(delay_setid,rctype,dowarning)
 const int delay_setid,rctype,dowarning;
{ struct stat stbuf;
  if(!delay_setid&&privileged&&   /* if we can setid now and we haven't yet, */
      (privileged==priv_DONTNEED||!stat(buf,&stbuf))) /* and we either don't */
     setids();     /* need the privileges or it's accessible, then setid now */
  if(0>bopen(buf))                                 /* try opening the rcfile */
   { if(dowarning)
rerr:   readerr(buf);
     return 0;
   }
  if(!delay_setid&&privileged)             /* if we're not supposed to delay */
   { closerc();                /* and we haven't changed yet, then close it, */
     setids();                           /* transmogrify to prevent peeking, */
     if(0>bopen(buf))                                       /* and try again */
        goto rerr;                 /* they couldn't read it, so it was bogus */
   }


Note the "closerc()" attempt above.

** Changed in: procmail (Ubuntu)
       Status: New => Invalid

** Visibility changed to: Public

-- 
Procmail opens $HOME/.procmailrc before dropping setuid permissions
https://bugs.launchpad.net/bugs/407459
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to