X-Git-Url: http://git.monstr.eu/?p=linux-2.6-microblaze.git;a=blobdiff_plain;f=fs%2Fnamei.c;h=78443a85480a5aea3b04b3064bb3ef594c83777b;hp=03d0e11e4f360ebdb2b941bd5bbbff3b38181632;hb=7bb5226c8a4bbf26a9ededc90532b0ad539d2017;hpb=347d81b68b8f7044c9ce3fefa130a736ca916176 diff --git a/fs/namei.c b/fs/namei.c index 03d0e11e4f36..78443a85480a 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2114,8 +2114,10 @@ static int link_path_walk(const char *name, struct nameidata *nd) return PTR_ERR(name); while (*name=='/') name++; - if (!*name) + if (!*name) { + nd->dir_mode = 0; // short-circuit the 'hardening' idiocy return 0; + } /* At this point we know we have a real path component. */ for(;;) {