From 734fcac78d8c430aeb3731590b77dfcfa6de224f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 22 Mar 2011 11:18:15 -0700 Subject: Add crgetfsuid()/crgetfsgid() helpers Solaris credentials don't have an fsuid/fsguid field but Linux credentials do. To handle this case the Solaris API is being modestly extended to include the crgetfsuid()/crgetfsgid() helper functions. Addititionally, because the crget*() helpers are implemented identically regardless of HAVE_CRED_STRUCT they have been moved outside the #ifdef to common code. This simplification means we only have one version of the helper to keep to to date. --- include/sys/cred.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sys') diff --git a/include/sys/cred.h b/include/sys/cred.h index 6f4cde73c..778d05255 100644 --- a/include/sys/cred.h +++ b/include/sys/cred.h @@ -50,9 +50,11 @@ extern void crfree(cred_t *cr); extern uid_t crgetuid(const cred_t *cr); extern uid_t crgetruid(const cred_t *cr); extern uid_t crgetsuid(const cred_t *cr); +extern uid_t crgetfsuid(const cred_t *cr); extern gid_t crgetgid(const cred_t *cr); extern gid_t crgetrgid(const cred_t *cr); extern gid_t crgetsgid(const cred_t *cr); +extern gid_t crgetfsgid(const cred_t *cr); extern int crgetngroups(const cred_t *cr); extern gid_t * crgetgroups(const cred_t *cr); extern int groupmember(gid_t gid, const cred_t *cr); -- cgit v1.2.3