Prev: [patch] fs/sysv: dereferencing ERR_PTR()
Next: [PATCH 2.6.34-rc1] proc: fix badness in fs/proc/generic.c
From: David Howells on 21 Apr 2010 06:50 Serge E. Hallyn <serue(a)us.ibm.com> wrote: > +int cred_setresuid(struct cred *new, uid_t ruid, uid_t euid, uid_t suid, > + int force); > +int cred_setresgid(struct cred *new, gid_t rgid, gid_t egid, gid_t sgid, > + int force); > +int cred_setfsuid(struct cred *new, uid_t uid, uid_t *old_fsuid); > +int cred_setfsgid(struct cred *new, gid_t gid, gid_t *old_fsgid); Can you mark these extern please? Other than that, these functions should probably be mentioned in Documentation/credentials.txt. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: David Howells on 4 May 2010 11:00
Serge E. Hallyn <serue(a)us.ibm.com> wrote: > Break the core functionality of set{fs,res}{u,g}id into cred_setX > which performs the access checks based on current_cred(), but performs > the requested change on a passed-in cred. > > Export the helpers, since p9auth can be compiled as a module. It > might be worth not allowing modular p9auth to avoid having to export > them. > > Really the setfs{u,g}id helper isn't needed, but move it as > well to keep the code consistent. > > This patch also changes set_user() to use new->user->user_ns. While > technically not needed as all callers should have new->user->user_ns > equal to current_userns(), it is more correct and may prevent surprises > in the future. > > Changelog: > Apr 24: (David Howells) make cred_setresuid etc extern, and > document the helpers in Documentation/credentials.txt. > > Signed-off-by: Serge E. Hallyn <serue(a)us.ibm.com> Acked-by: David Howells <dhowells(a)redhat.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |