We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a94860a commit 5bb068cCopy full SHA for 5bb068c
lib/libspl/os/linux/zone.c
@@ -42,20 +42,20 @@ getzoneid(void)
42
int c = snprintf(path, sizeof (path), "/proc/self/ns/user");
43
/* This API doesn't have any error checking... */
44
if (c < 0 || c >= sizeof (path))
45
- return (0);
+ return (GLOBAL_ZONEID);
46
47
ssize_t r = readlink(path, buf, sizeof (buf) - 1);
48
if (r < 0)
49
50
51
cp = strchr(buf, '[');
52
if (cp == NULL)
53
54
cp++;
55
56
unsigned long n = strtoul(cp, NULL, 10);
57
if (n == ULONG_MAX && errno == ERANGE)
58
59
zoneid_t z = (zoneid_t)n;
60
61
return (z);
0 commit comments