&optopt, &optarg, &flags, &value)) > 0) {
VERBOSE("'%s' -> '%s'\n", optopt, optarg ? optarg : "<none>");
+
switch (c) {
case 1:
/* got a "flag" option */
break;
case 'u':
mnt->uid = value;
- flags |= SMB_MOUNT_UID;
break;
case 'g':
mnt->gid = value;
- flags |= SMB_MOUNT_GID;
break;
case 'f':
mnt->file_mode = (value & S_IRWXUGO) | S_IFREG;
- flags |= SMB_MOUNT_FMODE;
break;
case 'd':
mnt->dir_mode = (value & S_IRWXUGO) | S_IFDIR;
- flags |= SMB_MOUNT_DMODE;
break;
case 'i':
strlcpy(mnt->codepage.local_name, optarg,
if (mnt->flags & opts[i].flag)
seq_printf(s, ",%s", opts[i].name);
- if (mnt->flags & SMB_MOUNT_UID)
+ if (mnt->uid != 0)
seq_printf(s, ",uid=%d", mnt->uid);
- if (mnt->flags & SMB_MOUNT_GID)
+ if (mnt->gid != 0)
seq_printf(s, ",gid=%d", mnt->gid);
if (mnt->mounted_uid != 0)
seq_printf(s, ",mounted_uid=%d", mnt->mounted_uid);
* Defaults for file_mode and dir_mode are unknown to us; they
* depend on the current umask of the user doing the mount.
*/
- if (mnt->flags & SMB_MOUNT_FMODE)
- seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO);
- if (mnt->flags & SMB_MOUNT_DMODE)
- seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO);
+ seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO);
+ seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO);
if (strcmp(mnt->codepage.local_name, CONFIG_NLS_DEFAULT))
seq_printf(s, ",iocharset=%s", mnt->codepage.local_name);
mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;
mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;
- mnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID |
- SMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE;
+ mnt->flags = (oldmnt->file_mode >> 9);
} else {
- mnt->file_mode = S_IRWXU | S_IRGRP | S_IXGRP |
- S_IROTH | S_IXOTH | S_IFREG;
- mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP |
- S_IROTH | S_IXOTH | S_IFDIR;
if (parse_options(mnt, raw_data))
goto out_bad_option;
}
sb->s_root = d_alloc_root(root_inode);
if (!sb->s_root)
goto out_no_root;
-
smb_new_dentry(sb->s_root);
return 0;