7648 useradd/mod commands operate on /home special filesystem
Review Request #286 — Created Dec. 6, 2016 and updated
Information | |
---|---|
alp | |
illumos-gate | |
Reviewers | |
general | |
user* commands use hardcoded values from userdefs.h. This patch allows override them at compile time.
Built illumos-gate with following variables added in illumos.sh:
export DEFSHL=/usr/bin/bash
export DEFROLESHL=/usr/bin/pfbash
export DEFPARENT=/export/home
.Added users using compiled useradd, generated defaults file.
diff -u /usr/include/userdefs.h ./proto/root_i386/usr/include/userdefs.h
--- /usr/include/userdefs.h 2013-08-06 22:38:41.876564000 +0400
+++ ./proto/root_i386/usr/include/userdefs.h 2016-12-06 14:39:27.447626560 +0300
@@ -31,8 +31,6 @@
#ifndef _USERDEFS_H
#define _USERDEFS_H-#pragma ident "%Z%%M% %I% %E% SMI" / SVr4.0 1.7.1.1 /
#include <project.h>
#ifdef __cplusplus
@@ -51,10 +49,10 @@
#define DEFPROJNAME "default"
#define DEFGROUP 1
#define DEFGNAME "other"
-#define DEFPARENT "/home"
+#define DEFPARENT "/export/home"
#define DEFSKL "/etc/skel"
-#define DEFSHL "/bin/sh"
-#define DEFROLESHL "/bin/pfsh"
+#define DEFSHL "/usr/bin/bash"
+#define DEFROLESHL "/usr/bin/pfbash"
#define DEFINACT 0
#define DEFEXPIRE ""
#define DEFAUTH ""Rebuilt illumos-gate without setting DEF* variables.
Checked that useradd -m is faulty (tries to create directories under /home) and generated defaults file matches one produced by non-patched version.
diff -u /usr/include/userdefs.h ~/srcs/illumos-gate/proto/root_i386/usr/include/userdefs.h
--- /usr/include/userdefs.h 2013-08-06 22:38:41.876564000 +0400
+++ /export/home/alp/srcs/illumos-gate/proto/root_i386/usr/include/userdefs.h 2016-12-06 16:29:56.888292115 +0300
@@ -31,8 +31,6 @@
#ifndef _USERDEFS_H
#define _USERDEFS_H-#pragma ident "%Z%%M% %I% %E% SMI" / SVr4.0 1.7.1.1 /
#include <project.h>
#ifdef __cplusplus
Testing Done: |
|
---|
-
-
-
usr/src/cmd/oamuser/user/userdefs.c (Diff revision 6) whitespace issue on lines 149-150, it seems to be tab versus space problem:)
Testing Done: |
|
---|
-
-
usr/src/Makefile.master (Diff revision 7) Makefile.master is included in just about every make job in the whole system. Does it really make sense for these to be in Makefile.master? Or could they be somewhere more localized?
Perhaps: usr/src/cmd/oamuser/user/Makefile?
-
-
usr/src/head/userdefs.x (Diff revision 7) If these are not really constants, would it make more sense do something like what was done for limits.h and _sysconf() (Not suggesting literally sysconf, but some internal function to go get the configured values).