Changeset 2480

Show
Ignore:
Timestamp:
01/28/07 12:35:19 (2 years ago)
Author:
dhozac
Message:

When we call the external mount, we need to preserve all of the options so it can parse them on its own.
The option defaults should set nodev in the flags.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/secure-mount.c

    r2403 r2480  
    7171    unsigned long       mask; 
    7272    char *              data; 
     73    char *              data_parsed; 
    7374}; 
    7475 
     
    122123    bool const                  is_dflt; 
    123124} const FSTAB_OPTIONS[] = { 
    124   { "defaults",   0,             (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC| 
     125  { "defaults",   MS_NODEV,      (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC| 
    125126                                  MS_SYNCHRONOUS), 0, false }, 
    126127  { "rbind",      MS_BIND|MS_REC, MS_BIND|MS_REC,  0, false }, 
     
    432433    if (mount(mnt->src, ".", 
    433434              mnt->type ? mnt->type : "", 
    434               mnt->flag,  mnt->data)==-1) { 
     435              mnt->flag,  mnt->data_parsed)==-1) { 
    435436      perror("secure-mount: mount()"); 
    436437      return false; 
     
    494495  } while (*ptr!='\0'); 
    495496 
    496   info->data = data; 
     497  info->data_parsed = data; 
    497498  return true; 
    498499}