X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=fs%2Fbinfmt_flat.c;h=1bffbe0ed7787d96bd8b36cc25d2bd74a1c3572f;hb=8fd90c8d1dacb5ff0f372217c97f57a9e61559cd;hp=397d3057d336a201b744a6ceadec16eaed651c0e;hpb=11ad2f52826ac6d58d6780d3d8a3e098c88d9142;p=karo-tx-linux.git diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 397d3057d336..1bffbe0ed778 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -820,6 +820,8 @@ static int load_flat_shared_library(int id, struct lib_info *libs) int res; char buf[16]; + memset(&bprm, 0, sizeof(bprm)); + /* Create the file name */ sprintf(buf, "/lib/lib%d.so", id); @@ -835,6 +837,12 @@ static int load_flat_shared_library(int id, struct lib_info *libs) if (!bprm.cred) goto out; + /* We don't really care about recalculating credentials at this point + * as we're past the point of no return and are dealing with shared + * libraries. + */ + bprm.cred_prepared = 1; + res = prepare_binprm(&bprm); if (!IS_ERR_VALUE(res))