fix
authorMiklos Szeredi <miklos@szeredi.hu>
Sun, 9 Jan 2005 20:05:27 +0000 (20:05 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Sun, 9 Jan 2005 20:05:27 +0000 (20:05 +0000)
ChangeLog
kernel/dir.c
kernel/fuse_i.h
kernel/inode.c
lib/helper.c
util/fusermount.c

index 747a1a903e3c403557c2fc6c04b57538756c23ab..24ce02dbf302cc4688f5a3b758cd3466db3dd44e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-09  Miklos Szeredi <miklos@szeredi.hu>
+
+       * Change "uid" mount option to "user_id" to avoid confusion with a
+       mount option "uid" commonly used by many filesystems
+
 2005-01-09  Miklos Szeredi <miklos@szeredi.hu>
 
        * Released 2.2-pre1
        * Add binary compatibility to 2.1 version of library with symbol
        versioning
 
+2004-12-03  Miklos Szeredi <miklos@szeredi.hu>
+
+       * Released 2.1
+
 2004-12-01  Miklos Szeredi <miklos@szeredi.hu>
 
        * kernel: clean up writing functions
index 08427a9270b572927bb9680db4c1a9c6c650d3ac..97d9a0b5ef949c93eecebfbf8a50298f1478651b 100644 (file)
@@ -436,7 +436,7 @@ static int fuse_revalidate(struct dentry *entry)
 
        if (get_node_id(inode) == FUSE_ROOT_ID) {
                if (!(fc->flags & FUSE_ALLOW_OTHER) &&
-                   current->fsuid != fc->uid &&
+                   current->fsuid != fc->user_id &&
                    (!(fc->flags & FUSE_ALLOW_ROOT) ||
                     current->fsuid != 0))
                        return -EACCES;
@@ -450,7 +450,7 @@ static int fuse_permission(struct inode *inode, int mask, struct nameidata *nd)
 {
        struct fuse_conn *fc = get_fuse_conn(inode);
 
-       if (!(fc->flags & FUSE_ALLOW_OTHER) && current->fsuid != fc->uid &&
+       if (!(fc->flags & FUSE_ALLOW_OTHER) && current->fsuid != fc->user_id &&
            (!(fc->flags & FUSE_ALLOW_ROOT) || current->fsuid != 0))
                return -EACCES;
        else if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
index 15c5d8b46f7f23105b637a494da5fff13cc6065d..bfbe864857cea12e91913b7c8f6645e4fd3501d3 100644 (file)
@@ -253,7 +253,7 @@ struct fuse_conn {
        struct file *file;
 
        /** The user id for this mount */
-       uid_t uid;
+       uid_t user_id;
 
        /** The fuse mount flags for this mount */
        unsigned flags;
index 1fd4edb7a9f8fc8295f69c83d52dc69c47b57208..d052f104e2b875a0cf45d9fcc71e5c6ddc10cf3d 100644 (file)
@@ -56,7 +56,7 @@ MODULE_PARM_DESC(mount_max, "Maximum number of FUSE mounts allowed, if -1 then u
 struct fuse_mount_data {
        int fd;
        unsigned rootmode;
-       unsigned uid;
+       unsigned user_id;
        unsigned flags;
        unsigned max_read;
 };
@@ -270,7 +270,7 @@ static void fuse_put_super(struct super_block *sb)
        spin_lock(&fuse_lock);
        mount_count --;
        fc->sb = NULL;
-       fc->uid = 0;
+       fc->user_id = 0;
        fc->flags = 0;
        /* Flush all readers on this fs */
        wake_up_all(&fc->waitq);
@@ -319,7 +319,7 @@ static int fuse_statfs(struct super_block *sb, struct kstatfs *buf)
 enum {
        OPT_FD,
        OPT_ROOTMODE,
-       OPT_UID,
+       OPT_USER_ID,
        OPT_DEFAULT_PERMISSIONS,
        OPT_ALLOW_OTHER,
        OPT_ALLOW_ROOT,
@@ -335,7 +335,7 @@ enum {
 static match_table_t tokens = {
        {OPT_FD,                        "fd=%u"},
        {OPT_ROOTMODE,                  "rootmode=%o"},
-       {OPT_UID,                       "uid=%u"},
+       {OPT_USER_ID,                   "user_id=%u"},
        {OPT_DEFAULT_PERMISSIONS,       "default_permissions"},
        {OPT_ALLOW_OTHER,               "allow_other"},
        {OPT_ALLOW_ROOT,                "allow_root"},
@@ -376,10 +376,10 @@ static int parse_fuse_opt(char *opt, struct fuse_mount_data *d)
                        d->rootmode = value;
                        break;
 
-               case OPT_UID:
+               case OPT_USER_ID:
                        if (match_int(&args[0], &value))
                                return 0;
-                       d->uid = value;
+                       d->user_id = value;
                        break;
 
                case OPT_DEFAULT_PERMISSIONS:
@@ -427,7 +427,7 @@ static int fuse_show_options(struct seq_file *m, struct vfsmount *mnt)
 {
        struct fuse_conn *fc = get_fuse_conn_super(mnt->mnt_sb);
 
-       seq_printf(m, ",uid=%u", fc->uid);
+       seq_printf(m, ",user_id=%u", fc->user_id);
        if (fc->flags & FUSE_DEFAULT_PERMISSIONS)
                seq_puts(m, ",default_permissions");
        if (fc->flags & FUSE_ALLOW_OTHER)
@@ -476,7 +476,7 @@ static struct fuse_conn *new_conn(void)
                fc->sb = NULL;
                fc->file = NULL;
                fc->flags = 0;
-               fc->uid = 0;
+               fc->user_id = 0;
                init_waitqueue_head(&fc->waitq);
                INIT_LIST_HEAD(&fc->pending);
                INIT_LIST_HEAD(&fc->processing);
@@ -646,7 +646,7 @@ static int fuse_read_super(struct super_block *sb, void *data, int silent)
                return -EINVAL;
 
        fc->flags = d.flags;
-       fc->uid = d.uid;
+       fc->user_id = d.user_id;
        fc->max_read = d.max_read;
 #ifdef KERNEL_2_6
        if (fc->max_read / PAGE_CACHE_SIZE < fc->bdi.ra_pages)
index 25a60aafdcbb8c8849b611399fe32d0c7a73264e..cdf9ab22f94ab530a1b483394dc62cf88fbab3f4 100644 (file)
@@ -36,6 +36,7 @@ static void usage(const char *progname)
             "Mount options:\n"
             "    default_permissions    enable permission checking\n"
             "    allow_other            allow access to other users\n"
+            "    allow_root             allow access to root\n"
             "    kernel_cache           cache files in kernel\n"
             "    large_read             issue large read requests (2.4 only)\n"
             "    direct_io              use direct I/O\n"
index 0686d7aeaaa30db8a5fe670527a6c1af55ced9e3..0ab5d4cfbd33bdda5fc58177cd6ffa955ecf8bd7 100644 (file)
@@ -460,7 +460,7 @@ static int do_mount(const char *mnt, const char *type, mode_t rootmode,
             fsname[len - fsname_str_len] = '\0';
         } else if (!begins_with(s, "fd=") &&
                    !begins_with(s, "rootmode=") &&
-                   !begins_with(s, "uid=")) {
+                   !begins_with(s, "user_id=")) {
             int on;
             int flag;
             int skip_option = 0;
@@ -501,7 +501,7 @@ static int do_mount(const char *mnt, const char *type, mode_t rootmode,
         free(optbuf);
         return -1;
     }
-    sprintf(d, "fd=%i,rootmode=%o,uid=%i", fd, rootmode, getuid());
+    sprintf(d, "fd=%i,rootmode=%o,user_id=%i", fd, rootmode, getuid());
     if (fsname == NULL) {
         fsname = strdup(dev);
         if (!fsname) {