Comment 2 for bug 676525

Revision history for this message
ChrisCauser (chy-causer) wrote :

Looking at the source and although I haven't tested it:

Line 1597:
 if (getuid()) {
  rc = check_fstab(thisprogram, mountpoint, orig_dev,
     &orgoptions);
  if (rc)
   goto assemble_exit;

  /* enable any default user mount flags */
  parsed_info->flags |= CIFS_SETUID_FLAGS;
 }

If the conditional were changed to geteuid(), then running mount.cifs as suid root would not result in an fstab error. Obviously I'd rather not do that and work with sudo if at all possible.