summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zlogin
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2014-03-20 19:10:46 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2014-03-20 19:10:59 +0000
commite8facfd99e91cf5fefa4291a3ba0b6a0710eea09 (patch)
treedf73671fcd2421ade9cb711f1f67e4241c5493bc /usr/src/cmd/zlogin
parent76436dc0854d1e18a76ccb58a9b496a0e93ae7c7 (diff)
downloadillumos-joyent-e8facfd99e91cf5fefa4291a3ba0b6a0710eea09.tar.gz
OS-2834 ship lx brand
Diffstat (limited to 'usr/src/cmd/zlogin')
-rw-r--r--usr/src/cmd/zlogin/zlogin.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/cmd/zlogin/zlogin.c b/usr/src/cmd/zlogin/zlogin.c
index f8d2656ee1..cadbda4a0b 100644
--- a/usr/src/cmd/zlogin/zlogin.c
+++ b/usr/src/cmd/zlogin/zlogin.c
@@ -2233,8 +2233,18 @@ main(int argc, char **argv)
/*
* In failsafe mode, we don't use login(1), so don't try
* setting up a utmpx entry.
- */
- if (!failsafe)
+ *
+ * A branded zone may have very different utmpx semantics.
+ * At the moment, we only have two brand types:
+ * Solaris-like (native, sn1) and Linux. In the Solaris
+ * case, we know exactly how to do the necessary utmpx
+ * setup. Fortunately for us, the Linux /bin/login is
+ * prepared to deal with a non-initialized utmpx entry, so
+ * we can simply skip it. If future brands don't fall into
+ * either category, we'll have to add a per-brand utmpx
+ * setup hook.
+ */
+ if (!failsafe && (strcmp(zonebrand, "lx") != 0))
if (setup_utmpx(slaveshortname) == -1)
return (1);