X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Fnamei.c;h=2a5c28f58b74f0993301d840b3f13e7142f780e0;hb=bcd84e948133e5fd7494a33ec347170e3f7505d3;hp=ad74877e1442c0c9ea5fca87b065e59090088b10;hpb=6d90b4f99d62e6cf7643c7d8b48a9d7c005455bd;p=mirror_ubuntu-zesty-kernel.git diff --git a/fs/namei.c b/fs/namei.c index ad74877e1442..2a5c28f58b74 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -888,8 +888,8 @@ static inline void put_link(struct nameidata *nd) path_put(&last->link); } -int sysctl_protected_symlinks __read_mostly = 0; -int sysctl_protected_hardlinks __read_mostly = 0; +int sysctl_protected_symlinks __read_mostly = 1; +int sysctl_protected_hardlinks __read_mostly = 1; /** * may_follow_link - Check symlink following for unsafe situations @@ -1100,7 +1100,6 @@ static int follow_automount(struct path *path, struct nameidata *nd, bool *need_mntput) { struct vfsmount *mnt; - const struct cred *old_cred; int err; if (!path->dentry->d_op || !path->dentry->d_op->d_automount) @@ -1129,9 +1128,7 @@ static int follow_automount(struct path *path, struct nameidata *nd, if (nd->total_link_count >= 40) return -ELOOP; - old_cred = override_creds(&init_cred); mnt = path->dentry->d_op->d_automount(path); - revert_creds(old_cred); if (IS_ERR(mnt)) { /* * The filesystem is allowed to return -EISDIR here to indicate