super.c (17f545ca1769e268e0190d88ab94dc2a117df280) | super.c (649f6e7718891fe7691e5084ce3fa623acba3129) |
---|---|
1/* 2 * linux/fs/nfs/super.c 3 * 4 * Copyright (C) 1992 Rick Sladkey 5 * 6 * nfs superblock handling functions 7 * 8 * Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some --- 1928 unchanged lines hidden (view full) --- 1937 1938 if (!(data->flags & NFS_MOUNT_TCP)) 1939 args->nfs_server.protocol = XPRT_TRANSPORT_UDP; 1940 /* N.B. caller will free nfs_server.hostname in all cases */ 1941 args->nfs_server.hostname = kstrdup(data->hostname, GFP_KERNEL); 1942 args->namlen = data->namlen; 1943 args->bsize = data->bsize; 1944 | 1/* 2 * linux/fs/nfs/super.c 3 * 4 * Copyright (C) 1992 Rick Sladkey 5 * 6 * nfs superblock handling functions 7 * 8 * Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some --- 1928 unchanged lines hidden (view full) --- 1937 1938 if (!(data->flags & NFS_MOUNT_TCP)) 1939 args->nfs_server.protocol = XPRT_TRANSPORT_UDP; 1940 /* N.B. caller will free nfs_server.hostname in all cases */ 1941 args->nfs_server.hostname = kstrdup(data->hostname, GFP_KERNEL); 1942 args->namlen = data->namlen; 1943 args->bsize = data->bsize; 1944 |
1945 args->auth_flavors[0] = RPC_AUTH_UNIX; | |
1946 if (data->flags & NFS_MOUNT_SECFLAVOUR) 1947 args->auth_flavors[0] = data->pseudoflavor; 1948 if (!args->nfs_server.hostname) 1949 goto out_nomem; 1950 1951 if (!(data->flags & NFS_MOUNT_NONLM)) 1952 args->flags &= ~(NFS_MOUNT_LOCAL_FLOCK| 1953 NFS_MOUNT_LOCAL_FCNTL); --- 453 unchanged lines hidden (view full) --- 2407static int nfs_bdi_register(struct nfs_server *server) 2408{ 2409 return bdi_register_dev(&server->backing_dev_info, server->s_dev); 2410} 2411 2412int nfs_set_sb_security(struct super_block *s, struct dentry *mntroot, 2413 struct nfs_mount_info *mount_info) 2414{ | 1945 if (data->flags & NFS_MOUNT_SECFLAVOUR) 1946 args->auth_flavors[0] = data->pseudoflavor; 1947 if (!args->nfs_server.hostname) 1948 goto out_nomem; 1949 1950 if (!(data->flags & NFS_MOUNT_NONLM)) 1951 args->flags &= ~(NFS_MOUNT_LOCAL_FLOCK| 1952 NFS_MOUNT_LOCAL_FCNTL); --- 453 unchanged lines hidden (view full) --- 2406static int nfs_bdi_register(struct nfs_server *server) 2407{ 2408 return bdi_register_dev(&server->backing_dev_info, server->s_dev); 2409} 2410 2411int nfs_set_sb_security(struct super_block *s, struct dentry *mntroot, 2412 struct nfs_mount_info *mount_info) 2413{ |
2415 return security_sb_set_mnt_opts(s, &mount_info->parsed->lsm_opts); | 2414 return security_sb_set_mnt_opts(s, &mount_info->parsed->lsm_opts, 2415 0, NULL); |
2416} 2417EXPORT_SYMBOL_GPL(nfs_set_sb_security); 2418 2419int nfs_clone_sb_security(struct super_block *s, struct dentry *mntroot, 2420 struct nfs_mount_info *mount_info) 2421{ 2422 /* clone any lsm security options from the parent to the new sb */ 2423 if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) --- 209 unchanged lines hidden (view full) --- 2633 goto out_no_address; 2634 args->nfs_server.addrlen = data->host_addrlen; 2635 if (copy_from_user(sap, data->host_addr, data->host_addrlen)) 2636 return -EFAULT; 2637 if (!nfs_verify_server_address(sap)) 2638 goto out_no_address; 2639 args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port); 2640 | 2416} 2417EXPORT_SYMBOL_GPL(nfs_set_sb_security); 2418 2419int nfs_clone_sb_security(struct super_block *s, struct dentry *mntroot, 2420 struct nfs_mount_info *mount_info) 2421{ 2422 /* clone any lsm security options from the parent to the new sb */ 2423 if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) --- 209 unchanged lines hidden (view full) --- 2633 goto out_no_address; 2634 args->nfs_server.addrlen = data->host_addrlen; 2635 if (copy_from_user(sap, data->host_addr, data->host_addrlen)) 2636 return -EFAULT; 2637 if (!nfs_verify_server_address(sap)) 2638 goto out_no_address; 2639 args->nfs_server.port = ntohs(((struct sockaddr_in *)sap)->sin_port); 2640 |
2641 args->auth_flavors[0] = RPC_AUTH_UNIX; | |
2642 if (data->auth_flavourlen) { 2643 if (data->auth_flavourlen > 1) 2644 goto out_inval_auth; 2645 if (copy_from_user(&args->auth_flavors[0], 2646 data->auth_flavours, 2647 sizeof(args->auth_flavors[0]))) 2648 return -EFAULT; 2649 } --- 114 unchanged lines hidden --- | 2641 if (data->auth_flavourlen) { 2642 if (data->auth_flavourlen > 1) 2643 goto out_inval_auth; 2644 if (copy_from_user(&args->auth_flavors[0], 2645 data->auth_flavours, 2646 sizeof(args->auth_flavors[0]))) 2647 return -EFAULT; 2648 } --- 114 unchanged lines hidden --- |