Add topic branch to conditionally remove idmap support. The
only things currently like this on linux appears in the nfs v4 implementation of idmap. For now we can do with out.
This commit is contained in:
parent
69b2257940
commit
9661d38088
17
.topmsg
17
.topmsg
|
@ -1,19 +1,6 @@
|
|||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Subject: [PATCH] zfs branch
|
||||
Subject: [PATCH] linux have idmap
|
||||
|
||||
Merged result of all changes which are relevant to both Solaris
|
||||
and Linux builds of the ZFS code. These are changes where there
|
||||
is a reasonable chance they will be accepted upstream.
|
||||
|
||||
Additionally, since this is effectively the root of the linux
|
||||
ZFS tree the core linux build system is added here. This
|
||||
includes autogen.sh, configure.ac, m4 macros, some scripts/*,
|
||||
and makefiles for all the core ZFS components. Linux-only
|
||||
features which require tweaks to the build system should appear
|
||||
on the relevant topic branches. All autotools products which
|
||||
result from autogen.sh are commited to the linux-configure-branch.
|
||||
|
||||
This branch also contains the META, ChangeLog, AUTHORS, TODO,
|
||||
and README, files.
|
||||
Use idmap service if available.
|
||||
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
|
|
@ -45,7 +45,9 @@
|
|||
#include <grp.h>
|
||||
#include <stddef.h>
|
||||
#include <ucred.h>
|
||||
#ifdef HAVE_IDMAP
|
||||
#include <idmap.h>
|
||||
#endif /* HAVE_IDMAP */
|
||||
#include <aclutils.h>
|
||||
|
||||
#include <sys/spa.h>
|
||||
|
@ -1996,6 +1998,7 @@ zfs_prop_get_numeric(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t *value,
|
|||
return (0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_IDMAP
|
||||
static int
|
||||
idmap_id_to_numeric_domain_rid(uid_t id, boolean_t isuser,
|
||||
char **domainp, idmap_rid_t *ridp)
|
||||
|
@ -2030,6 +2033,7 @@ out:
|
|||
(void) idmap_fini(idmap_hdl);
|
||||
return (err);
|
||||
}
|
||||
#endif /* HAVE_IDMAP */
|
||||
|
||||
/*
|
||||
* convert the propname into parameters needed by kernel
|
||||
|
@ -2062,6 +2066,7 @@ userquota_propname_decode(const char *propname, boolean_t zoned,
|
|||
cp = strchr(propname, '@') + 1;
|
||||
|
||||
if (strchr(cp, '@')) {
|
||||
#ifdef HAVE_IDMAP
|
||||
/*
|
||||
* It's a SID name (eg "user@domain") that needs to be
|
||||
* turned into S-1-domainID-RID. There should be a
|
||||
|
@ -2082,6 +2087,9 @@ userquota_propname_decode(const char *propname, boolean_t zoned,
|
|||
return (ENOENT);
|
||||
(void) strlcpy(domain, mapdomain, domainlen);
|
||||
*ridp = rid;
|
||||
#else
|
||||
return (ENOSYS);
|
||||
#endif /* HAVE_IDMAP */
|
||||
} else if (strncmp(cp, "S-1-", 4) == 0) {
|
||||
/* It's a numeric SID (eg "S-1-234-567-89") */
|
||||
(void) strcpy(domain, cp);
|
||||
|
@ -2114,6 +2122,7 @@ userquota_propname_decode(const char *propname, boolean_t zoned,
|
|||
*ridp = gr->gr_gid;
|
||||
}
|
||||
} else {
|
||||
#ifdef HAVE_IDMAP
|
||||
/* It's a user/group ID (eg "12345"). */
|
||||
uid_t id = strtoul(cp, &end, 10);
|
||||
idmap_rid_t rid;
|
||||
|
@ -2131,6 +2140,9 @@ userquota_propname_decode(const char *propname, boolean_t zoned,
|
|||
} else {
|
||||
*ridp = id;
|
||||
}
|
||||
#else
|
||||
return (ENOSYS);
|
||||
#endif /* HAVE_IDMAP */
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue