zfs_fuid_map_id(zfsvfs_t *zfsvfs, uint64_t fuid,
cred_t *cr, zfs_fuid_type_t type)
{
+#ifdef HAVE_KSID
uint32_t index = FUID_INDEX(fuid);
const char *domain;
uid_t id;
FUID_RID(fuid), &id);
}
return (id);
+#else
+ if(type == ZFS_OWNER || type == ZFS_ACE_USER)
+ return (crgetuid(cr));
+ else
+ return (crgetgid(cr));
+#endif /* HAVE_KSID */
}
/*
}
}
+#ifdef HAVE_KSID
/*
* Create a file system FUID, based on information in the users cred
*
return (FUID_ENCODE(idx, rid));
}
+#endif /* HAVE_KSID */
/*
* Create a file system FUID for an ACL ace
zfs_fuid_create(zfsvfs_t *zfsvfs, uint64_t id, cred_t *cr,
zfs_fuid_type_t type, zfs_fuid_info_t **fuidpp)
{
+#ifdef HAVE_KSID
const char *domain;
char *kdomain;
uint32_t fuid_idx = FUID_INDEX(id);
kmem_free(zfuid, sizeof (zfs_fuid_t));
}
return (FUID_ENCODE(idx, rid));
+#else
+ if (type == ZFS_OWNER)
+ return crgetuid(cr);
+ else
+ return crgetgid(cr);
+#endif
}
void
boolean_t
zfs_groupmember(zfsvfs_t *zfsvfs, uint64_t id, cred_t *cr)
{
+#ifdef HAVE_KSID
ksid_t *ksid = crgetsid(cr, KSID_GROUP);
ksidlist_t *ksidlist = crgetsidlist(cr);
uid_t gid;
*/
gid = zfs_fuid_map_id(zfsvfs, id, cr, ZFS_GROUP);
return (groupmember(gid, cr));
+#else
+ return (B_TRUE);
+#endif
}
void