'configure.ac'
],
{
- 'AC_CONFIG_MACRO_DIR' => 1,
- 'AM_AUX_DIR_EXPAND' => 1,
- 'AC_DEFUN' => 1,
+ 'm4_include' => 1,
+ 'AM_MAKE_INCLUDE' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
- 'AM_AUTOMAKE_VERSION' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ '_AM_SET_OPTION' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AU_DEFUN' => 1,
+ '_m4_warn' => 1,
'AM_SANITY_CHECK' => 1,
- 'AM_MAKE_INCLUDE' => 1,
'AM_SET_LEADING_DOT' => 1,
- '_AM_PROG_TAR' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
'_AM_DEPENDENCIES' => 1,
+ 'include' => 1,
'AM_RUN_LOG' => 1,
- 'AM_PROG_INSTALL_SH' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
- 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ '_AM_PROG_CC_C_O' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_CONFIG_MACRO_DIR' => 1,
+ 'AM_MISSING_PROG' => 1,
'AC_DEFUN_ONCE' => 1,
- 'AM_CONDITIONAL' => 1,
- '_AM_SET_OPTION' => 1,
- 'm4_pattern_forbid' => 1,
- 'AU_DEFUN' => 1,
- 'include' => 1,
- '_AM_IF_OPTION' => 1,
- '_AM_MANGLE_OPTION' => 1,
- '_m4_warn' => 1,
+ '_AM_PROG_TAR' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ '_AM_AUTOCONF_VERSION' => 1,
'AM_DEP_TRACK' => 1,
- 'AM_SILENT_RULES' => 1,
- '_AM_PROG_CC_C_O' => 1,
- 'm4_include' => 1,
+ '_AM_IF_OPTION' => 1,
'AM_MISSING_HAS_RUN' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
- '_AM_AUTOCONF_VERSION' => 1,
- '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
- '_AC_AM_CONFIG_HEADER_HOOK' => 1,
- 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
- 'AM_SET_DEPDIR' => 1,
- 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
- 'm4_pattern_allow' => 1,
- '_AM_SET_OPTIONS' => 1,
'AM_SUBST_NOTMAKE' => 1,
- 'AM_MISSING_PROG' => 1
+ 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ 'AC_DEFUN' => 1,
+ 'm4_pattern_forbid' => 1,
+ '_AM_MANGLE_OPTION' => 1
}
], 'Autom4te::Request' ),
bless( [
'configure.ac'
],
{
- 'AM_PROG_CXX_C_O' => 1,
+ 'AM_MAKEFILE_INCLUDE' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AM_PROG_MOC' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
- 'm4_pattern_allow' => 1,
- 'AC_CONFIG_HEADERS' => 1,
- 'AC_FC_PP_SRCEXT' => 1,
- 'LT_INIT' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AM_NLS' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ 'm4_pattern_forbid' => 1,
+ '_AM_COND_ELSE' => 1,
'm4_include' => 1,
- 'AC_INIT' => 1,
+ 'AC_SUBST_TRACE' => 1,
+ 'AC_SUBST' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
- '_m4_warn' => 1,
- 'AM_SILENT_RULES' => 1,
- 'include' => 1,
- 'AM_MAKEFILE_INCLUDE' => 1,
- 'sinclude' => 1,
- 'AC_CANONICAL_TARGET' => 1,
- 'AM_PATH_GUILE' => 1,
- 'm4_pattern_forbid' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
- '_AM_COND_ENDIF' => 1,
- 'AM_CONDITIONAL' => 1,
- '_LT_AC_TAGCONFIG' => 1,
- 'AC_CONFIG_FILES' => 1,
- 'AC_CANONICAL_HOST' => 1,
- 'AC_FC_FREEFORM' => 1,
- 'AC_CANONICAL_BUILD' => 1,
- 'AM_PROG_MKDIR_P' => 1,
- 'm4_sinclude' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
+ 'm4_pattern_allow' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
- 'AM_XGETTEXT_OPTION' => 1,
- 'AM_EXTRA_RECURSIVE_TARGETS' => 1,
- 'AC_DEFINE_TRACE_LITERAL' => 1,
- 'AM_NLS' => 1,
+ 'AC_CANONICAL_HOST' => 1,
'_AM_COND_IF' => 1,
- 'LT_SUPPORTED_TAG' => 1,
- 'AC_SUBST_TRACE' => 1,
- '_AM_COND_ELSE' => 1,
- 'AM_ENABLE_MULTILIB' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
- 'AH_OUTPUT' => 1,
- 'AC_PROG_LIBTOOL' => 1,
- 'AM_GNU_GETTEXT' => 1,
+ 'AM_PROG_CXX_C_O' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
'AM_POT_TOOLS' => 1,
- 'AC_SUBST' => 1,
- 'AC_CONFIG_LIBOBJ_DIR' => 1,
- 'AC_LIBSOURCE' => 1,
- 'AC_FC_SRCEXT' => 1,
+ 'AM_CONDITIONAL' => 1,
+ '_m4_warn' => 1,
+ 'AM_PROG_MKDIR_P' => 1,
'AM_PROG_FC_C_O' => 1,
- 'LT_CONFIG_LTDL_DIR' => 1,
- 'AM_PROG_CC_C_O' => 1,
+ 'AC_FC_FREEFORM' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AC_FC_SRCEXT' => 1,
+ 'include' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_FC_PP_SRCEXT' => 1,
+ 'sinclude' => 1,
'AC_FC_PP_DEFINE' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_LIBSOURCE' => 1,
+ '_AM_COND_ENDIF' => 1,
+ 'AM_PATH_GUILE' => 1,
+ 'AH_OUTPUT' => 1,
'AM_PROG_F77_C_O' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
- 'AM_AUTOMAKE_VERSION' => 1,
- 'AC_CONFIG_LINKS' => 1,
- 'AC_CONFIG_SUBDIRS' => 1,
- 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_INIT' => 1,
+ 'm4_sinclude' => 1,
+ 'AM_EXTRA_RECURSIVE_TARGETS' => 1,
+ 'LT_INIT' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AC_CANONICAL_BUILD' => 1,
+ 'AM_XGETTEXT_OPTION' => 1,
+ 'AM_GNU_GETTEXT' => 1,
'AM_PROG_AR' => 1,
- 'AM_PROG_MOC' => 1
+ 'AC_DEFINE_TRACE_LITERAL' => 1
}
], 'Autom4te::Request' )
);
make[1]: Nothing to be done for 'am--depfiles'.
make[1]: Leaving directory '/home/morpheus/subu_land/subu/src'
config.status:1151: $? = 0
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by mk-subu-0 config.status 1.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES =
+ CONFIG_HEADERS =
+ CONFIG_LINKS =
+ CONFIG_COMMANDS =
+ $ ./config.status src/makefile depfiles
+
+on manorhouse
+
+config.status:840: creating src/makefile
+config.status:1069: executing depfiles commands
+config.status:1146: cd src && sed -e '/# am--include-marker/d' makefile | make -f - am--depfiles
+make[1]: Entering directory '/home/morpheus/subu_land/subu/src'
+make[1]: Leaving directory '/home/morpheus/subu_land/subu/src'
+config.status:1151: $? = 0
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by mk-subu-0 config.status 1.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES =
+ CONFIG_HEADERS =
+ CONFIG_LINKS =
+ CONFIG_COMMANDS =
+ $ ./config.status src/makefile depfiles
+
+on manorhouse
+
+config.status:840: creating src/makefile
+config.status:1069: executing depfiles commands
+config.status:1146: cd src && sed -e '/# am--include-marker/d' makefile | make -f - am--depfiles
+make[1]: Entering directory '/home/morpheus/subu_land/subu/src'
+make[1]: Leaving directory '/home/morpheus/subu_land/subu/src'
+config.status:1151: $? = 0
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by mk-subu-0 config.status 1.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES =
+ CONFIG_HEADERS =
+ CONFIG_LINKS =
+ CONFIG_COMMANDS =
+ $ ./config.status src/makefile depfiles
+
+on manorhouse
+
+config.status:840: creating src/makefile
+config.status:1069: executing depfiles commands
+config.status:1146: cd src && sed -e '/# am--include-marker/d' makefile | make -f - am--depfiles
+make[1]: Entering directory '/home/morpheus/subu_land/subu/src'
+make[1]: Leaving directory '/home/morpheus/subu_land/subu/src'
+config.status:1151: $? = 0
--- /dev/null
+dispatch.lib.o: dispatch.lib.c /usr/include/stdc-predef.h \
+ /usr/include/sys/types.h /usr/include/features.h \
+ /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
+ /usr/include/bits/long-double.h /usr/include/gnu/stubs.h \
+ /usr/include/gnu/stubs-64.h /usr/include/bits/types.h \
+ /usr/include/bits/typesizes.h /usr/include/bits/types/clock_t.h \
+ /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \
+ /usr/include/bits/types/timer_t.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
+ /usr/include/bits/stdint-intn.h /usr/include/endian.h \
+ /usr/include/bits/endian.h /usr/include/bits/byteswap.h \
+ /usr/include/bits/uintn-identity.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/types/sigset_t.h \
+ /usr/include/bits/types/__sigset_t.h \
+ /usr/include/bits/types/struct_timeval.h \
+ /usr/include/bits/types/struct_timespec.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \
+ /usr/include/bits/pthreadtypes-arch.h /usr/include/unistd.h \
+ /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+ /usr/include/bits/confname.h /usr/include/bits/getopt_posix.h \
+ /usr/include/bits/getopt_core.h /usr/include/wait.h \
+ /usr/include/sys/wait.h /usr/include/signal.h /usr/include/bits/signum.h \
+ /usr/include/bits/signum-generic.h \
+ /usr/include/bits/types/sig_atomic_t.h \
+ /usr/include/bits/types/siginfo_t.h /usr/include/bits/types/__sigval_t.h \
+ /usr/include/bits/siginfo-arch.h /usr/include/bits/siginfo-consts.h \
+ /usr/include/bits/siginfo-consts-arch.h \
+ /usr/include/bits/types/sigval_t.h /usr/include/bits/types/sigevent_t.h \
+ /usr/include/bits/sigevent-consts.h /usr/include/bits/sigaction.h \
+ /usr/include/bits/sigcontext.h /usr/include/bits/types/stack_t.h \
+ /usr/include/sys/ucontext.h /usr/include/bits/sigstack.h \
+ /usr/include/bits/ss_flags.h /usr/include/bits/types/struct_sigstack.h \
+ /usr/include/bits/sigthread.h /usr/include/bits/waitflags.h \
+ /usr/include/bits/waitstatus.h /usr/include/stdlib.h \
+ /usr/include/bits/libc-header-start.h /usr/include/bits/floatn.h \
+ /usr/include/bits/floatn-common.h /usr/include/bits/types/locale_t.h \
+ /usr/include/bits/types/__locale_t.h /usr/include/alloca.h \
+ /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
+ /usr/include/stdio.h /usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
+ /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
+ /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
+ /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
+ /usr/include/bits/types/cookie_io_functions_t.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h /usr/include/errno.h /usr/include/bits/errno.h \
+ /usr/include/linux/errno.h /usr/include/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/bits/types/error_t.h local_common.h ../config.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h dispatch.lib.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/long-double.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/types/clock_t.h:
+
+/usr/include/bits/types/clockid_t.h:
+
+/usr/include/bits/types/time_t.h:
+
+/usr/include/bits/types/timer_t.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
+
+/usr/include/bits/stdint-intn.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/bits/uintn-identity.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/types/sigset_t.h:
+
+/usr/include/bits/types/__sigset_t.h:
+
+/usr/include/bits/types/struct_timeval.h:
+
+/usr/include/bits/types/struct_timespec.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/thread-shared-types.h:
+
+/usr/include/bits/pthreadtypes-arch.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/bits/getopt_posix.h:
+
+/usr/include/bits/getopt_core.h:
+
+/usr/include/wait.h:
+
+/usr/include/sys/wait.h:
+
+/usr/include/signal.h:
+
+/usr/include/bits/signum.h:
+
+/usr/include/bits/signum-generic.h:
+
+/usr/include/bits/types/sig_atomic_t.h:
+
+/usr/include/bits/types/siginfo_t.h:
+
+/usr/include/bits/types/__sigval_t.h:
+
+/usr/include/bits/siginfo-arch.h:
+
+/usr/include/bits/siginfo-consts.h:
+
+/usr/include/bits/siginfo-consts-arch.h:
+
+/usr/include/bits/types/sigval_t.h:
+
+/usr/include/bits/types/sigevent_t.h:
+
+/usr/include/bits/sigevent-consts.h:
+
+/usr/include/bits/sigaction.h:
+
+/usr/include/bits/sigcontext.h:
+
+/usr/include/bits/types/stack_t.h:
+
+/usr/include/sys/ucontext.h:
+
+/usr/include/bits/sigstack.h:
+
+/usr/include/bits/ss_flags.h:
+
+/usr/include/bits/types/struct_sigstack.h:
+
+/usr/include/bits/sigthread.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/bits/libc-header-start.h:
+
+/usr/include/bits/floatn.h:
+
+/usr/include/bits/floatn-common.h:
+
+/usr/include/bits/types/locale_t.h:
+
+/usr/include/bits/types/__locale_t.h:
+
+/usr/include/alloca.h:
+
+/usr/include/bits/stdlib-bsearch.h:
+
+/usr/include/bits/stdlib-float.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
+
+/usr/include/bits/types/__fpos_t.h:
+
+/usr/include/bits/types/__mbstate_t.h:
+
+/usr/include/bits/types/__fpos64_t.h:
+
+/usr/include/bits/types/__FILE.h:
+
+/usr/include/bits/types/FILE.h:
+
+/usr/include/bits/types/struct_FILE.h:
+
+/usr/include/bits/types/cookie_io_functions_t.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-generic/errno.h:
+
+/usr/include/asm-generic/errno-base.h:
+
+/usr/include/bits/types/error_t.h:
+
+local_common.h:
+
+../config.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h:
+
+dispatch.lib.h:
--- /dev/null
+dispatch_useradd.lib.o: dispatch_useradd.lib.c /usr/include/stdc-predef.h \
+ /usr/include/sys/types.h /usr/include/features.h \
+ /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
+ /usr/include/bits/long-double.h /usr/include/gnu/stubs.h \
+ /usr/include/gnu/stubs-64.h /usr/include/bits/types.h \
+ /usr/include/bits/typesizes.h /usr/include/bits/types/clock_t.h \
+ /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \
+ /usr/include/bits/types/timer_t.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
+ /usr/include/bits/stdint-intn.h /usr/include/endian.h \
+ /usr/include/bits/endian.h /usr/include/bits/byteswap.h \
+ /usr/include/bits/uintn-identity.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/types/sigset_t.h \
+ /usr/include/bits/types/__sigset_t.h \
+ /usr/include/bits/types/struct_timeval.h \
+ /usr/include/bits/types/struct_timespec.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \
+ /usr/include/bits/pthreadtypes-arch.h /usr/include/stdlib.h \
+ /usr/include/bits/libc-header-start.h /usr/include/bits/waitflags.h \
+ /usr/include/bits/waitstatus.h /usr/include/bits/floatn.h \
+ /usr/include/bits/floatn-common.h /usr/include/alloca.h \
+ /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
+ /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+ /usr/include/bits/environments.h /usr/include/bits/confname.h \
+ /usr/include/bits/getopt_posix.h /usr/include/bits/getopt_core.h \
+ /usr/include/stdio.h /usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
+ /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
+ /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
+ /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h /usr/include/errno.h /usr/include/bits/errno.h \
+ /usr/include/linux/errno.h /usr/include/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ local_common.h ../config.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h dispatch.lib.h \
+ dispatch_useradd.lib.h /usr/include/pwd.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/long-double.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/types/clock_t.h:
+
+/usr/include/bits/types/clockid_t.h:
+
+/usr/include/bits/types/time_t.h:
+
+/usr/include/bits/types/timer_t.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
+
+/usr/include/bits/stdint-intn.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/bits/uintn-identity.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/types/sigset_t.h:
+
+/usr/include/bits/types/__sigset_t.h:
+
+/usr/include/bits/types/struct_timeval.h:
+
+/usr/include/bits/types/struct_timespec.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/thread-shared-types.h:
+
+/usr/include/bits/pthreadtypes-arch.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/bits/libc-header-start.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/bits/floatn.h:
+
+/usr/include/bits/floatn-common.h:
+
+/usr/include/alloca.h:
+
+/usr/include/bits/stdlib-bsearch.h:
+
+/usr/include/bits/stdlib-float.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/bits/getopt_posix.h:
+
+/usr/include/bits/getopt_core.h:
+
+/usr/include/stdio.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
+
+/usr/include/bits/types/__fpos_t.h:
+
+/usr/include/bits/types/__mbstate_t.h:
+
+/usr/include/bits/types/__fpos64_t.h:
+
+/usr/include/bits/types/__FILE.h:
+
+/usr/include/bits/types/FILE.h:
+
+/usr/include/bits/types/struct_FILE.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-generic/errno.h:
+
+/usr/include/asm-generic/errno-base.h:
+
+local_common.h:
+
+../config.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h:
+
+dispatch.lib.h:
+
+dispatch_useradd.lib.h:
+
+/usr/include/pwd.h:
-subu-mk-0.o: subu-mk-0.c /usr/include/stdc-predef.h /usr/include/unistd.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/bits/wordsize.h /usr/include/bits/long-double.h \
- /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
- /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+subu-mk-0.o: subu-mk-0.c /usr/include/stdc-predef.h /usr/include/stdio.h \
+ /usr/include/bits/libc-header-start.h /usr/include/features.h \
+ /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
+ /usr/include/bits/long-double.h /usr/include/gnu/stubs.h \
+ /usr/include/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
- /usr/include/bits/confname.h /usr/include/bits/getopt_posix.h \
- /usr/include/bits/getopt_core.h /usr/include/sys/types.h \
- /usr/include/bits/types/clock_t.h /usr/include/bits/types/clockid_t.h \
- /usr/include/bits/types/time_t.h /usr/include/bits/types/timer_t.h \
- /usr/include/bits/stdint-intn.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/bits/byteswap.h \
- /usr/include/bits/uintn-identity.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/types/sigset_t.h \
- /usr/include/bits/types/__sigset_t.h \
- /usr/include/bits/types/struct_timeval.h \
- /usr/include/bits/types/struct_timespec.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \
- /usr/include/bits/pthreadtypes-arch.h /usr/include/stdio.h \
- /usr/include/bits/libc-header-start.h \
/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
+ /usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
/usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
/usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
- /usr/include/bits/types/cookie_io_functions_t.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/bits/stdio.h /usr/include/stdlib.h \
- /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
- /usr/include/bits/floatn.h /usr/include/bits/floatn-common.h \
- /usr/include/bits/types/locale_t.h /usr/include/bits/types/__locale_t.h \
- /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \
- /usr/include/bits/stdlib-float.h \
- /usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h /usr/include/pwd.h \
- /usr/include/string.h /usr/include/strings.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/bits/statx.h ../config.h
+ /usr/include/bits/stdio.h subu-mk-0.lib.h
/usr/include/stdc-predef.h:
-/usr/include/unistd.h:
+/usr/include/stdio.h:
+
+/usr/include/bits/libc-header-start.h:
/usr/include/features.h:
/usr/include/gnu/stubs-64.h:
-/usr/include/bits/posix_opt.h:
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
-/usr/include/bits/environments.h:
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
/usr/include/bits/types.h:
/usr/include/bits/typesizes.h:
-/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/bits/getopt_posix.h:
-
-/usr/include/bits/getopt_core.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/bits/types/clock_t.h:
-
-/usr/include/bits/types/clockid_t.h:
-
-/usr/include/bits/types/time_t.h:
-
-/usr/include/bits/types/timer_t.h:
-
-/usr/include/bits/stdint-intn.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/bits/byteswap.h:
-
-/usr/include/bits/uintn-identity.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/types/sigset_t.h:
-
-/usr/include/bits/types/__sigset_t.h:
-
-/usr/include/bits/types/struct_timeval.h:
-
-/usr/include/bits/types/struct_timespec.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/bits/thread-shared-types.h:
-
-/usr/include/bits/pthreadtypes-arch.h:
-
-/usr/include/stdio.h:
-
-/usr/include/bits/libc-header-start.h:
-
-/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
-
/usr/include/bits/types/__fpos_t.h:
/usr/include/bits/types/__mbstate_t.h:
/usr/include/bits/types/struct_FILE.h:
-/usr/include/bits/types/cookie_io_functions_t.h:
-
/usr/include/bits/stdio_lim.h:
/usr/include/bits/sys_errlist.h:
/usr/include/bits/stdio.h:
-/usr/include/stdlib.h:
-
-/usr/include/bits/waitflags.h:
-
-/usr/include/bits/waitstatus.h:
-
-/usr/include/bits/floatn.h:
-
-/usr/include/bits/floatn-common.h:
-
-/usr/include/bits/types/locale_t.h:
-
-/usr/include/bits/types/__locale_t.h:
-
-/usr/include/alloca.h:
-
-/usr/include/bits/stdlib-bsearch.h:
-
-/usr/include/bits/stdlib-float.h:
-
-/usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h:
-
-/usr/include/pwd.h:
-
-/usr/include/string.h:
-
-/usr/include/strings.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/bits/statx.h:
-
-../config.h:
+subu-mk-0.lib.h:
+++ /dev/null
-subu-mk-0.o: subu-mk-0.c /usr/include/stdc-predef.h /usr/include/stdio.h \
- /usr/include/bits/libc-header-start.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
- /usr/include/bits/long-double.h /usr/include/gnu/stubs.h \
- /usr/include/gnu/stubs-64.h \
- /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
- /usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
- /usr/include/bits/types.h /usr/include/bits/typesizes.h \
- /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
- /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
- /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/bits/stdio.h subu-mk-0.fi.h useradd.fi.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/environments.h /usr/include/bits/confname.h \
- /usr/include/bits/getopt_posix.h /usr/include/bits/getopt_core.h \
- /usr/include/sys/types.h /usr/include/bits/types/clock_t.h \
- /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \
- /usr/include/bits/types/timer_t.h /usr/include/bits/stdint-intn.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/bits/byteswap.h /usr/include/bits/uintn-identity.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/types/sigset_t.h /usr/include/bits/types/__sigset_t.h \
- /usr/include/bits/types/struct_timeval.h \
- /usr/include/bits/types/struct_timespec.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \
- /usr/include/bits/pthreadtypes-arch.h
-
-/usr/include/stdc-predef.h:
-
-/usr/include/stdio.h:
-
-/usr/include/bits/libc-header-start.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/bits/long-double.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
-
-/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/bits/types/__fpos_t.h:
-
-/usr/include/bits/types/__mbstate_t.h:
-
-/usr/include/bits/types/__fpos64_t.h:
-
-/usr/include/bits/types/__FILE.h:
-
-/usr/include/bits/types/FILE.h:
-
-/usr/include/bits/types/struct_FILE.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/bits/stdio.h:
-
-subu-mk-0.fi.h:
-
-useradd.fi.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/environments.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/bits/getopt_posix.h:
-
-/usr/include/bits/getopt_core.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/bits/types/clock_t.h:
-
-/usr/include/bits/types/clockid_t.h:
-
-/usr/include/bits/types/time_t.h:
-
-/usr/include/bits/types/timer_t.h:
-
-/usr/include/bits/stdint-intn.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/bits/byteswap.h:
-
-/usr/include/bits/uintn-identity.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/types/sigset_t.h:
-
-/usr/include/bits/types/__sigset_t.h:
-
-/usr/include/bits/types/struct_timeval.h:
-
-/usr/include/bits/types/struct_timespec.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/bits/thread-shared-types.h:
-
-/usr/include/bits/pthreadtypes-arch.h:
--- /dev/null
+subu-mk-0.cli.o: subu-mk-0.cli.c /usr/include/stdc-predef.h \
+ /usr/include/stdio.h /usr/include/bits/libc-header-start.h \
+ /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/bits/wordsize.h /usr/include/bits/long-double.h \
+ /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
+ /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+ /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
+ /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
+ /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h subu-mk-0.lib.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/stdio.h:
+
+/usr/include/bits/libc-header-start.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/long-double.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/types/__fpos_t.h:
+
+/usr/include/bits/types/__mbstate_t.h:
+
+/usr/include/bits/types/__fpos64_t.h:
+
+/usr/include/bits/types/__FILE.h:
+
+/usr/include/bits/types/FILE.h:
+
+/usr/include/bits/types/struct_FILE.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+subu-mk-0.lib.h:
--- /dev/null
+subu-mk-0.fi.o: subu-mk-0.fi.c /usr/include/stdc-predef.h \
+ /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/bits/wordsize.h /usr/include/bits/long-double.h \
+ /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
+ /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+ /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
+ /usr/include/bits/confname.h /usr/include/bits/getopt_posix.h \
+ /usr/include/bits/getopt_core.h /usr/include/sys/types.h \
+ /usr/include/bits/types/clock_t.h /usr/include/bits/types/clockid_t.h \
+ /usr/include/bits/types/time_t.h /usr/include/bits/types/timer_t.h \
+ /usr/include/bits/stdint-intn.h /usr/include/endian.h \
+ /usr/include/bits/endian.h /usr/include/bits/byteswap.h \
+ /usr/include/bits/uintn-identity.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/types/sigset_t.h \
+ /usr/include/bits/types/__sigset_t.h \
+ /usr/include/bits/types/struct_timeval.h \
+ /usr/include/bits/types/struct_timespec.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \
+ /usr/include/bits/pthreadtypes-arch.h /usr/include/stdio.h \
+ /usr/include/bits/libc-header-start.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
+ /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
+ /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
+ /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
+ /usr/include/bits/types/cookie_io_functions_t.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h /usr/include/stdlib.h \
+ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+ /usr/include/bits/floatn.h /usr/include/bits/floatn-common.h \
+ /usr/include/bits/types/locale_t.h /usr/include/bits/types/__locale_t.h \
+ /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \
+ /usr/include/bits/stdlib-float.h /usr/include/pwd.h \
+ /usr/include/string.h /usr/include/strings.h /usr/include/sys/stat.h \
+ /usr/include/bits/stat.h /usr/include/bits/statx.h ../config.h \
+ dispatch.h local_common.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h dispatch_useradd.h \
+ subu-mk-0.fi.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/unistd.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/long-double.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/bits/getopt_posix.h:
+
+/usr/include/bits/getopt_core.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/bits/types/clock_t.h:
+
+/usr/include/bits/types/clockid_t.h:
+
+/usr/include/bits/types/time_t.h:
+
+/usr/include/bits/types/timer_t.h:
+
+/usr/include/bits/stdint-intn.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/bits/uintn-identity.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/types/sigset_t.h:
+
+/usr/include/bits/types/__sigset_t.h:
+
+/usr/include/bits/types/struct_timeval.h:
+
+/usr/include/bits/types/struct_timespec.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/thread-shared-types.h:
+
+/usr/include/bits/pthreadtypes-arch.h:
+
+/usr/include/stdio.h:
+
+/usr/include/bits/libc-header-start.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
+
+/usr/include/bits/types/__fpos_t.h:
+
+/usr/include/bits/types/__mbstate_t.h:
+
+/usr/include/bits/types/__fpos64_t.h:
+
+/usr/include/bits/types/__FILE.h:
+
+/usr/include/bits/types/FILE.h:
+
+/usr/include/bits/types/struct_FILE.h:
+
+/usr/include/bits/types/cookie_io_functions_t.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/bits/floatn.h:
+
+/usr/include/bits/floatn-common.h:
+
+/usr/include/bits/types/locale_t.h:
+
+/usr/include/bits/types/__locale_t.h:
+
+/usr/include/alloca.h:
+
+/usr/include/bits/stdlib-bsearch.h:
+
+/usr/include/bits/stdlib-float.h:
+
+/usr/include/pwd.h:
+
+/usr/include/string.h:
+
+/usr/include/strings.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/bits/statx.h:
+
+../config.h:
+
+dispatch.h:
+
+local_common.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h:
+
+dispatch_useradd.h:
+
+subu-mk-0.fi.h:
--- /dev/null
+subu-mk-0.lib.o: subu-mk-0.lib.c /usr/include/stdc-predef.h \
+ /usr/include/sys/types.h /usr/include/features.h \
+ /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
+ /usr/include/bits/long-double.h /usr/include/gnu/stubs.h \
+ /usr/include/gnu/stubs-64.h /usr/include/bits/types.h \
+ /usr/include/bits/typesizes.h /usr/include/bits/types/clock_t.h \
+ /usr/include/bits/types/clockid_t.h /usr/include/bits/types/time_t.h \
+ /usr/include/bits/types/timer_t.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h \
+ /usr/include/bits/stdint-intn.h /usr/include/endian.h \
+ /usr/include/bits/endian.h /usr/include/bits/byteswap.h \
+ /usr/include/bits/uintn-identity.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/types/sigset_t.h \
+ /usr/include/bits/types/__sigset_t.h \
+ /usr/include/bits/types/struct_timeval.h \
+ /usr/include/bits/types/struct_timespec.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/bits/thread-shared-types.h \
+ /usr/include/bits/pthreadtypes-arch.h /usr/include/unistd.h \
+ /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
+ /usr/include/bits/confname.h /usr/include/bits/getopt_posix.h \
+ /usr/include/bits/getopt_core.h /usr/include/stdio.h \
+ /usr/include/bits/libc-header-start.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h \
+ /usr/include/bits/types/__fpos_t.h /usr/include/bits/types/__mbstate_t.h \
+ /usr/include/bits/types/__fpos64_t.h /usr/include/bits/types/__FILE.h \
+ /usr/include/bits/types/FILE.h /usr/include/bits/types/struct_FILE.h \
+ /usr/include/bits/types/cookie_io_functions_t.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h /usr/include/stdlib.h \
+ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+ /usr/include/bits/floatn.h /usr/include/bits/floatn-common.h \
+ /usr/include/bits/types/locale_t.h /usr/include/bits/types/__locale_t.h \
+ /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \
+ /usr/include/bits/stdlib-float.h /usr/include/pwd.h \
+ /usr/include/string.h /usr/include/strings.h /usr/include/sys/stat.h \
+ /usr/include/bits/stat.h /usr/include/bits/statx.h dispatch.lib.h \
+ local_common.h ../config.h \
+ /usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h \
+ dispatch_useradd.lib.h subu-mk-0.lib.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/bits/long-double.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/types/clock_t.h:
+
+/usr/include/bits/types/clockid_t.h:
+
+/usr/include/bits/types/time_t.h:
+
+/usr/include/bits/types/timer_t.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stddef.h:
+
+/usr/include/bits/stdint-intn.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/bits/uintn-identity.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/types/sigset_t.h:
+
+/usr/include/bits/types/__sigset_t.h:
+
+/usr/include/bits/types/struct_timeval.h:
+
+/usr/include/bits/types/struct_timespec.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/bits/thread-shared-types.h:
+
+/usr/include/bits/pthreadtypes-arch.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/bits/getopt_posix.h:
+
+/usr/include/bits/getopt_core.h:
+
+/usr/include/stdio.h:
+
+/usr/include/bits/libc-header-start.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdarg.h:
+
+/usr/include/bits/types/__fpos_t.h:
+
+/usr/include/bits/types/__mbstate_t.h:
+
+/usr/include/bits/types/__fpos64_t.h:
+
+/usr/include/bits/types/__FILE.h:
+
+/usr/include/bits/types/FILE.h:
+
+/usr/include/bits/types/struct_FILE.h:
+
+/usr/include/bits/types/cookie_io_functions_t.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/bits/floatn.h:
+
+/usr/include/bits/floatn-common.h:
+
+/usr/include/bits/types/locale_t.h:
+
+/usr/include/bits/types/__locale_t.h:
+
+/usr/include/alloca.h:
+
+/usr/include/bits/stdlib-bsearch.h:
+
+/usr/include/bits/stdlib-float.h:
+
+/usr/include/pwd.h:
+
+/usr/include/string.h:
+
+/usr/include/strings.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/bits/statx.h:
+
+dispatch.lib.h:
+
+local_common.h:
+
+../config.h:
+
+/usr/lib/gcc/x86_64-redhat-linux/8/include/stdbool.h:
+
+dispatch_useradd.lib.h:
+
+subu-mk-0.lib.h:
--- /dev/null
+
+
+filename.tag.extension
+
+extension:
+ .c for C source
+ .cc for C++ source
+ .h for C header file
+ .hh for C++ header file
+ .o an object file
+
+tag:
+ .lib. The resulting .o file to be placed in release library and is part of the
+ programming interface.
+ .aux. The resulting.o file not directly part of the programming interface, but
+ it might be called by functions that are.
+ .cli. The source file has a main call and is to be relased as part of the command line interface
+ .loc. file has a main call to be made into a local uitlity function
+
+We carry the source file tag and extension to the .o file. We do not put tags
+nor extensions on command line executables.
+
+local_common.h should be included in all source files
+++ /dev/null
-/*
-fork/exec/wait a command
-
-if the error values returned by the exec'd program
-are less than 1 << 16, then
-
-*/
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include "local_common.h"
-#include "dispatch.h"
-
-/*
- returns -1 upon failure
-
- The wstatus returned from wait() might be either the error we returned when exec failed,
- or the return value from the exec'ed process. We don't know what the possible return
- values are from exec'ed process might be, so we have no way of multiplexing a unique
- exec error code with it.
-
- specific dispatch versions can be made for specific functions.
-*/
-
-
-int dispatch(char **argv, char **envp){
- if( !argv || !argv[0] ){
- fprintf(stderr, "argv[0] null on call to dispatch().\n");
- return -1;
- }
- pid_t pid = fork(void);
- if( pid == -1 ){
- fprintf(stderr, "fork() failed in dispatch().\n");
- return -1;
- }
- if( pid == 0 ){ // we are the child
- execvpe(argv[0], argv, envp);
- // exec will only return if it has an error ..
- perror(command);
- return -1;
- }else{ // we are the parent
- int wstatus;
- wait(1, &wstatus, 0);
- if(wstatus)
- return -1;
- else
- return 0;
- }
-}
+++ /dev/null
-#ifndef DISPATCH_FI_H
-#define DISPATCH_FI_H
-#include "local_common.h"
-
-int dispatch(char **argv, char **envp);
-
-#endif
-
-
--- /dev/null
+/*
+fork/exec/wait a command
+
+if the error values returned by the exec'd program
+are less than 1 << 16, then
+
+*/
+
+// without this #define execvpe is undefined
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <wait.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include "local_common.h"
+#include "dispatch.lib.h"
+
+
+
+/*
+ Execs the command passed in argv[0];
+ Returns -1 upon failure.
+
+ The wstatus returned from wait() might be either the error we returned when
+ exec failed, or the return value from the command. An arbitary command is
+ passed in, so we don't know what its return values might be. Consquently, we
+ have no way of multiplexing a unique exec error code with the command return
+ value within wstatus. If the prorgrammer knows the return values of the command
+ passed in, and wants better behavior, he or she can spin a special version of
+ dispatch for that command.
+*/
+int dispatch(char **argv, char **envp){
+ if( !argv || !argv[0] ){
+ fprintf(stderr, "argv[0] null. Null command passed into dispatch().\n");
+ return -1;
+ }
+ char *command = argv[0];
+ pid_t pid = fork();
+ if( pid == -1 ){
+ fprintf(stderr, "fork() failed in dispatch().\n");
+ return -1;
+ }
+ if( pid == 0 ){ // we are the child
+ execvpe(command, argv, envp);
+ // exec will only return if it has an error ..
+ perror(command);
+ return -1;
+ }else{ // we are the parent
+ int wstatus;
+ waitpid(pid, &wstatus, 0);
+ if(wstatus)
+ return -1;
+ else
+ return 0;
+ }
+}
--- /dev/null
+#ifndef DISPATCH_LIB_H
+#define DISPATCH_LIB_H
+#include "local_common.h"
+
+int dispatch(char **argv, char **envp);
+
+#endif
+
+
+++ /dev/null
-/*
-There is no C library interface to useradd(8), but if there were, these functions
-would be found there instead.
-
-*/
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include "local_common.h"
-#include "dispatch_useradd.h"
-
-// we have a contract with the caller that argv[1] is always the subuname
-useradd_ret dispatch_useradd(char **argv, char **envp){
- run_err_init(run_err);
- if( !argv || !argv[0] || !argv[1]){
- fprintf(stderr,"useradd() needs a first argument as the name of the user to be made");
- return useradd_ret(USERADD_ERR_ARGC, NULL);
- }
- char *subu_name = argv[1];
- if( run(argv, envp) == -1 ){
- fprintf(stderr,"%s failed\n", argv[0]);
- return useradd_ret(USER_ERR_RUN);
- }
- struct password *pw_record = getpwnam(subu_name);
- uint count = 1;
- while( !pw_record && count <= 3 ){
- #ifdef DEBUG
- printf("try %u, getpwnam failed, trying again\n", count);
- #endif
- sleep(1);
- pw_record = getpwnam(subu_name);
- count++;
- }
- if( !pw_record ){
- return struct useradd_ret(USERADD_ERR_PWREC, NULL);
- }
- return struct useradd_ret(0, pw_record);
-}
-
+++ /dev/null
-#ifndef DISPATCH_USERADD_H
-#define DISPATCH_USERADD_H
-
-#include <unistd.h>
-#include <pwd.h>
-#include <sys/types.h>
-
-// some value larger than any wstatus value
-#define USERADD_ERR_UNDEFINED (1 << 16);
-#define USERADD_ERR_ARGCNT (2 << 16);
-#define USERADD_ERR_PWREC (3 << 16);
-
-// only use pw_record if error is zero
-struct dispatch_useradd_ret{
- useradd_ret(error=USERADD_ERR_UNDEFINED,pwd=NULL):error(error),pwd(pwd){}
- int error;
- struct password *pw_record;// as per getpwnam man page do not free() this.
-};
-struct dispatch_useradd_ret useradd(char **argv, char **envp);
-
-#endif
-
-
--- /dev/null
+/*
+There is no C library interface to useradd(8), but if there were, these functions
+would be found there instead.
+
+*/
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+#include "local_common.h"
+#include "dispatch.lib.h"
+#include "dispatch_useradd.lib.h"
+
+// we have a contract with the caller that argv[1] is always the subuname
+struct dispatch_useradd_ret_t dispatch_useradd(char **argv, char **envp){
+ struct dispatch_useradd_ret_t ret;
+ {
+ if( !argv || !argv[0] || !argv[1]){
+ fprintf(stderr,"useradd() needs a first argument as the name of the user to be made");
+ ret.error = DISPATCH_USERADD_ERR_ARGC;
+ ret.pw_record = NULL;
+ return ret;
+ }
+
+ char *subu_name;
+ {
+ subu_name = argv[1];
+ if( dispatch(argv, envp) == -1 ){
+ fprintf(stderr,"%s failed\n", argv[0]);
+ ret.error = DISPATCH_USERADD_ERR_DISPATCH;
+ ret.pw_record = NULL;
+ return ret;
+ }}
+
+ {
+ struct passwd *pw_record = getpwnam(subu_name);
+ uint count = 1;
+ while( !pw_record && count <= 3 ){
+ #ifdef DEBUG
+ printf("try %u, getpwnam failed, trying again\n", count);
+ #endif
+ sleep(1);
+ pw_record = getpwnam(subu_name);
+ count++;
+ }
+ if( !pw_record ){
+ ret.error = DISPATCH_USERADD_ERR_PWREC;
+ ret.pw_record = NULL;
+ return ret;
+ }
+ ret.error = 0;
+ ret.pw_record = pw_record;
+ return ret;
+ }}}
+
--- /dev/null
+#ifndef DISPATCH_USERADD_LIB_H
+#define DISPATCH_USERADD_LIB_H
+
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+// some value larger than any wstatus value
+#define DISPATCH_USERADD_ERR_UNDEFINED 1;
+#define DISPATCH_USERADD_ERR_ARGC 2;
+#define DISPATCH_USERADD_ERR_PWREC 3;
+#define DISPATCH_USERADD_ERR_DISPATCH 4;
+
+// only use pw_record if error is zero
+struct dispatch_useradd_ret_t{
+ int error;
+ struct passwd *pw_record;// as per getpwnam man page do not free() this.
+};
+
+struct dispatch_useradd_ret_t dispatch_useradd(char **argv, char **envp);
+
+#endif
+
+
#ifndef LOCAL_COMMON_H
#define LOCAL_COMMON_H
+#include "config.h"
#include <stdbool.h>
#define DEBUG
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_subu_mk_0_OBJECTS = subu-mk-0.$(OBJEXT) useradd-0.$(OBJEXT)
+am_subu_mk_0_OBJECTS = subu-mk-0.cli.$(OBJEXT) subu-mk-0.lib.$(OBJEXT) \
+ dispatch.lib.$(OBJEXT) dispatch_useradd.lib.$(OBJEXT)
subu_mk_0_OBJECTS = $(am_subu_mk_0_OBJECTS)
subu_mk_0_LDADD = $(LDADD)
AM_V_P = $(am__v_P_$(V))
DEFAULT_INCLUDES = -I. -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/subu-mk-0.Po \
- ./$(DEPDIR)/useradd-0.Po
+am__depfiles_remade = ./$(DEPDIR)/dispatch.lib.Po \
+ ./$(DEPDIR)/dispatch_useradd.lib.Po \
+ ./$(DEPDIR)/subu-mk-0.cli.Po ./$(DEPDIR)/subu-mk-0.lib.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
top_builddir = ..
top_srcdir = ..
subu_mk_0_SOURCES = \
- subu-mk-0.c\
- useradd-0.c
+ subu-mk-0.cli.c\
+ subu-mk-0.lib.c\
+ dispatch.lib.c\
+ dispatch_useradd.lib.c
all: all-am
distclean-compile:
-rm -f *.tab.c
-include ./$(DEPDIR)/subu-mk-0.Po # am--include-marker
-include ./$(DEPDIR)/useradd-0.Po # am--include-marker
+include ./$(DEPDIR)/dispatch.lib.Po # am--include-marker
+include ./$(DEPDIR)/dispatch_useradd.lib.Po # am--include-marker
+include ./$(DEPDIR)/subu-mk-0.cli.Po # am--include-marker
+include ./$(DEPDIR)/subu-mk-0.lib.Po # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
- -rm -f ./$(DEPDIR)/subu-mk-0.Po
- -rm -f ./$(DEPDIR)/useradd-0.Po
+ -rm -f ./$(DEPDIR)/dispatch.lib.Po
+ -rm -f ./$(DEPDIR)/dispatch_useradd.lib.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.cli.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.lib.Po
-rm -f makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -f ./$(DEPDIR)/subu-mk-0.Po
- -rm -f ./$(DEPDIR)/useradd-0.Po
+ -rm -f ./$(DEPDIR)/dispatch.lib.Po
+ -rm -f ./$(DEPDIR)/dispatch_useradd.lib.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.cli.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.lib.Po
-rm -f makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
bin_PROGRAMS=subu-mk-0
subu_mk_0_SOURCES=\
- subu-mk-0.c\
- useradd-0.c
+ subu-mk-0.cli.c\
+ subu-mk-0.lib.c\
+ dispatch.lib.c\
+ dispatch_useradd.lib.c
+
+
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_subu_mk_0_OBJECTS = subu-mk-0.$(OBJEXT) useradd-0.$(OBJEXT)
+am_subu_mk_0_OBJECTS = subu-mk-0.cli.$(OBJEXT) subu-mk-0.lib.$(OBJEXT) \
+ dispatch.lib.$(OBJEXT) dispatch_useradd.lib.$(OBJEXT)
subu_mk_0_OBJECTS = $(am_subu_mk_0_OBJECTS)
subu_mk_0_LDADD = $(LDADD)
AM_V_P = $(am__v_P_@AM_V@)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/subu-mk-0.Po \
- ./$(DEPDIR)/useradd-0.Po
+am__depfiles_remade = ./$(DEPDIR)/dispatch.lib.Po \
+ ./$(DEPDIR)/dispatch_useradd.lib.Po \
+ ./$(DEPDIR)/subu-mk-0.cli.Po ./$(DEPDIR)/subu-mk-0.lib.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
subu_mk_0_SOURCES = \
- subu-mk-0.c\
- useradd-0.c
+ subu-mk-0.cli.c\
+ subu-mk-0.lib.c\
+ dispatch.lib.c\
+ dispatch_useradd.lib.c
all: all-am
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subu-mk-0.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/useradd-0.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.lib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch_useradd.lib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subu-mk-0.cli.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subu-mk-0.lib.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
- -rm -f ./$(DEPDIR)/subu-mk-0.Po
- -rm -f ./$(DEPDIR)/useradd-0.Po
+ -rm -f ./$(DEPDIR)/dispatch.lib.Po
+ -rm -f ./$(DEPDIR)/dispatch_useradd.lib.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.cli.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.lib.Po
-rm -f makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -f ./$(DEPDIR)/subu-mk-0.Po
- -rm -f ./$(DEPDIR)/useradd-0.Po
+ -rm -f ./$(DEPDIR)/dispatch.lib.Po
+ -rm -f ./$(DEPDIR)/dispatch_useradd.lib.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.cli.Po
+ -rm -f ./$(DEPDIR)/subu-mk-0.lib.Po
-rm -f makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
+++ /dev/null
-
-#CFLAGS= -std=c11 -Werror -H -fsyntax-only
-#CFLAGS= -std=c11 -Werror -O
-CFLAGS= -std=c11 -Werror -ggdb
-
-all: subu-mk-0
-
-subu-mk-0: subu-mk-0.c
- gcc -c $(CFLAGS) subu-mk-0.c
- sudo ./setuid_root_subu-mk-0
-
+++ /dev/null
-/*
- subu-mk-0 command
-
-*/
-
-#include <stdio.h>
-#include "subu-mk-0.fi.h"
-
-int main(int argc, char **argv, char **env){
- char *command = argv[0];
- if( argc != 2 ){
- fprintf(stderr, "usage: %s subu", command);
- return ERR_ARG_CNT;
- }
- uid_gid ug = subu-mk-0(argv[1]);
- return ug.error;
-}
--- /dev/null
+/*
+ subu-mk-0 command
+
+*/
+
+#include <stdio.h>
+#include "subu-mk-0.lib.h"
+
+int main(int argc, char **argv, char **env){
+ char *command = argv[0];
+ if( argc != 2 ){
+ fprintf(stderr, "usage: %s subu", command);
+ return ERR_ARG_CNT;
+ }
+ return subu_mk_0(argv[1]);
+}
+++ /dev/null
-/*
- Makes a new subu user.
-
- According to the man page, we are not alloed to free the buffers made by getpwid().
-
- 1. We have to make the subu first so that we will have subu_uid and subu_gid
- to work with.
-
- 2. Then we add user access via setfacl to masteru's home directory and to
- subuland, so that we have permissions to make the home directory.
-
- 3. Then we create the subu home directory. .. I wonder where the system
- gets the umask for this? Perhaps we should create the dir, and then change
- the ownership instead?
-
- 4. Still as subu, we add facls to our directory to give masteru access.
-
- ... then finished, good part is that we never need to move back to root.
-
-setfacl -m u:subu:x masteru
-setfacl -m u:subu:x masteru/subuland
-setfacl -m d:u:masteru:rwX,u:masteru:rwX subu
-
-*/
-// without #define get warning: implicit declaration of function ‘seteuid’/‘setegid’
-#define _GNU_SOURCE
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <string.h>
-#include <sys/stat.h>
-#include "config.h"
-#include "useradd.h"
-#include "subu-mk-0.fi.h"
-
-typedef unsigned int uint;
-
-uid_gid subu_mk_0(char *subuname){
-
- //--------------------------------------------------------------------------------
- // we must be invoked from a user account and be running as root
- uid_t uid = getuid();
- uid_t euid = geteuid();
- gid_t gid = getgid();
- gid_t egid = getegid();
- #ifdef DEBUG
- printf("uid %u, gid %u, euid %u\n", uid, gid, euid);
- #endif
- if( uid == 0 || euid != 0 ){
- fprintf(stderr, "this program must be run setuid root from a user account\n");
- return ERR_SETUID_ROOT;
- }
-
- //--------------------------------------------------------------------------------
- // who are these people anyway?
- size_t subuname_len;
- char *masteru_name;
- {
- // subuname is the first argument passed in
- // verify that subuname is legal! --> code goes here ...
- subuname_len = strlen(subuname);
- struct passwd *masteru_pw_record_pt = getpwuid(uid);
- masteru_name = materu_pw_record_pt->pw_name;
- }
- #ifdef DEBUG
- printf("masteru_name: %s\n", masteru_name);
- #endif
-
- //--------------------------------------------------------------------------------
- // build the subuland path
- char *masteru_home;
- char *subuland;
- size_t subuland_len;
- {
- masteru_home = passwd_record_pt->pw_dir;
- size_t masteru_home_len = strlen(masteru_home);
- if( masteru_home_len == 0 || masteru_home[0] == '(' ){
- fprintf(stderr,"strange, %s has no home directory\n", masteru_name);
- return ERR_BAD_MASTERU_HOME;
- }
- char *subuland_extension = "/subuland/";
- size_t subuland_extension_len = strlen(subuland_extension);
- subuland = (char *)malloc( masteru_home_len + subuland_extension_len + 1 );
- strcpy(subuland, masteru_home);
- strcpy(subuland + masteru_home_len, subuland_extension);
- subuland_len = masteru_home_len + subuland_extension_len + subuname_len;
- }
- #ifdef DEBUG
- printf("The path to subuland: \"%s\"\n", subuland);
- #endif
-
- //--------------------------------------------------------------------------------
- // Just because masteru_home is referenced in /etc/passwd does not mean it exists.
- // We also require that the subuland sub directory exists.
- {
- struct stat st;
- if( stat(masteru_home, &st) == -1) {
- fprintf(stderr, "Strange, masteru home does not exist, \"%s\".", masteru_home);
- return ERR_NOT_EXIST_MASTERU_HOME;
- }
- if( stat(subuland, &st) == -1) {
- fprintf(stderr, "$masteru_home/subuland not exist");
- return ERR_NOT_EXIST_SUBULAND;
- }
- }
-
- //--------------------------------------------------------------------------------
- // the name for the subu home directory, which is subuland/subuname
- char subuhome;
- {
- subuhome_len = subuland_len + subuname_len;
- subuhome = (char *)malloc(subuhome_len + 1);
- strcpy (subuhome, subuland);
- strcpy (subuhome + subuland_len, subuname);
- }
- #ifdef DEBUG
- printf("subuhome: %s\n", subuhome);
- #endif
-
- /*--------------------------------------------------------------------------------
- make the subservient user account
- We can't make the home directory yet, because we need to add execute access rights to
- masteru home and subuland so that the subu user can cd to subuhome.
- -d, --home-dir HOME_DIR
- The new user will be created using HOME_DIR as the value for the user's login directory. The default
- is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory
- HOME_DIR does not have to exist but will not be created if it is missing.
- */
- uid_t subu_uid;
- tid_t subu_gid;
- {
- char *argv[5];
- argv[0] = "/usr/bin/useradd";
- argv[1] = subuname;
- argv[2] = "-d";
- argv[3] = subuhome;
- argv[4] = (char *) NULL;
- char *envp[1];
- envp[0] (char *) NULL;
- struct ret u_ret = useradd(argv, envp);
- if(ret.error){
- fprintf(stderr, "%u useradd failed\n", ret.error)
- return ERR_FAILED_USERADD;
- }
- subu_uid = user_ret.pw_record->pw_uid;
- subu_gid = user_ret.pw_record->pw_gid;
- }
-
- //--------------------------------------------------------------------------------
- // give subu x access to masteru and subuland
- {
- char access[2 + subuname_len + 2 + 1];
- strcpy(access, "u:");
- strcpy(access + 2, subuname);
- strcpy(access + 2 + subuname_len, ":x");
-
- char *argv[];
- argv[0] = "/usr/bin/setfacl";
- argv[1] = "-m";
- argv[2] = access;
- argv[3] = masteru_home
-
- }
-
- // subu sets acls to allow masteru access
-
- free(subuland);
- free(subuhome);
- return 0;
-}
-
-/*
- // change to subu space
- if( seteuid(subu_uid) == -1 || setegid(subu_gid) == -1 ){ // we are root so this should never happen
- fprintf(stderr,"Strangely, root could not seteuid/setegid to %s\n", subuname);
- return ERR_FAILED_MKDIR_SUBU;
- }
-
-*/
+++ /dev/null
-#ifndef SUBU_MK_0_H
-#define SUBU_MK_0_H
-
-#define ERR_ARG_CNT 1
-#define ERR_SETUID_ROOT 2
-#define ERR_BAD_MASTERU_HOME 3
-#define ERR_NOT_EXIST_MASTERU_HOME 4
-#define ERR_NOT_EXIST_SUBU_LAND 5
-#define ERR_FAILED_MKDIR_SUBU 6
-#define ERR_FAILED_RESTORATION 7
-#define ERR_FAILED_USERADD 8
-
-
-struct uid_gid subu_mk_0(char *subuname);
-
-#endif
--- /dev/null
+/*
+ Makes a new subu user.
+
+ According to the man page, we are not alloed to free the memory allocated by getpwid().
+
+
+setfacl -m d:u:masteru:rwX,u:masteru:rwX subuname
+
+*/
+// without this #define we get the warning: implicit declaration of function ‘seteuid’/‘setegid’
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <string.h>
+#include <sys/stat.h>
+#include "dispatch.lib.h"
+#include "dispatch_useradd.lib.h"
+#include "subu-mk-0.lib.h"
+
+typedef unsigned int uint;
+
+int subu_mk_0(char *subuname){
+
+ //--------------------------------------------------------------------------------
+ // check that we are run from a user account (the masteru) and that we have setuid to root
+ uid_t uid = getuid();
+ uid_t euid = geteuid();
+ gid_t gid = getgid();
+ gid_t egid = getegid();
+ #ifdef DEBUG
+ printf("uid %u, gid %u, euid %u\n", uid, gid, euid);
+ #endif
+ if( uid == 0 || euid != 0 ){
+ fprintf(stderr, "this program must be run setuid root from a user account\n");
+ return ERR_SETUID_ROOT;
+ }
+
+ //--------------------------------------------------------------------------------
+ // who are these people anyway?
+ size_t subuname_len;
+ char *masteru_name;
+ size_t masteru_name_len;
+ struct passwd *masteru_pw_record_pt;
+ {
+ // subuname is the first argument passed in
+ // verify that subuname is legal! --> code goes here ...
+ subuname_len = strlen(subuname);
+ masteru_pw_record_pt = getpwuid(uid);
+ masteru_name = masteru_pw_record_pt->pw_name;
+ masteru_name_len = strlen(masteru_name);
+ }
+ #ifdef DEBUG
+ printf("masteru_name: %s\n", masteru_name);
+ #endif
+
+ //--------------------------------------------------------------------------------
+ // build the subuland path
+ char *masteru_home;
+ size_t masteru_home_len;
+ char *subuland;
+ size_t subuland_len;
+ {
+ masteru_home = masteru_pw_record_pt->pw_dir;
+ masteru_home_len = strlen(masteru_home);
+ if( masteru_home_len == 0 || masteru_home[0] == '(' ){
+ fprintf(stderr,"strange, %s has no home directory\n", masteru_name);
+ return ERR_BAD_MASTERU_HOME;
+ }
+ char *subuland_extension = "/subuland/";
+ size_t subuland_extension_len = strlen(subuland_extension);
+ subuland = (char *)malloc( masteru_home_len + subuland_extension_len + 1 );
+ strcpy(subuland, masteru_home);
+ strcpy(subuland + masteru_home_len, subuland_extension);
+ subuland_len = masteru_home_len + subuland_extension_len;
+ }
+ #ifdef DEBUG
+ printf("masteru_home: \"%s\"\n", masteru_home);
+ printf("The path to subuland: \"%s\"\n", subuland);
+ #endif
+
+ //--------------------------------------------------------------------------------
+ // Just because masteru_home is referenced in /etc/passwd does not mean it exists.
+ // We also require that the subuland sub directory exists.
+ {
+ struct stat st;
+ if( stat(masteru_home, &st) == -1) {
+ fprintf(stderr, "Strange, masteru home does not exist, \"%s\".", masteru_home);
+ free(subuland);
+ return ERR_NOT_EXIST_MASTERU_HOME;
+ }
+ if( stat(subuland, &st) == -1) {
+ fprintf(stderr, "$masteru_home/subuland/ does not exist");
+ free(subuland);
+ return ERR_NOT_EXIST_SUBULAND;
+ }
+ }
+
+ //--------------------------------------------------------------------------------
+ // the name for the subu home directory, which is $(masteru_home)/subuland/subuname
+ char *subuhome;
+ size_t subuhome_len;
+ {
+ subuhome_len = subuland_len + subuname_len;
+ subuhome = (char *)malloc(subuhome_len + 1);
+ if( !subuhome ){
+ perror("subu_mk_0");
+ free(subuland);
+ return ERR_MALLOC;
+ }
+ strcpy (subuhome, subuland);
+ strcpy (subuhome + subuland_len, subuname);
+ }
+ #ifdef DEBUG
+ printf("subuhome: %s\n", subuhome);
+ #endif
+
+ /*--------------------------------------------------------------------------------
+ make the subservient user account
+
+ We need to add execute access rights to masteru home and subuland so that
+ the subu user can cd to subuhome.
+
+ Ok to specify the new home directory to useradd, note this from the man page:
+
+ -d, --home-dir HOME_DIR The new user will be created using HOME_DIR
+ as the value for the user's login directory. ... The directory HOME_DIR
+ does not have to exist but will not be created if it is missing.
+ */
+ uid_t subuuid;
+ gid_t subugid;
+ {
+ char *argv[5];
+ argv[0] = "/usr/bin/useradd";
+ argv[1] = subuname;
+ argv[2] = "-d";
+ argv[3] = subuhome;
+ argv[4] = (char *) NULL;
+ char *envp[1];
+ envp[0] = (char *) NULL;
+ struct dispatch_useradd_ret_t ret;
+ ret = dispatch_useradd(argv, envp);
+ if(ret.error){
+ fprintf(stderr, "%u useradd failed\n", ret.error);
+ free(subuland);
+ free(subuhome);
+ return ERR_FAILED_USERADD;
+ }
+ subuuid = ret.pw_record->pw_uid;
+ subugid = ret.pw_record->pw_gid;
+ }
+
+ //--------------------------------------------------------------------------------
+ // give subu x access to masteru and subuland
+ // setfacl -m u:subuname:x masteru
+ // setfacl -m u:subuname:x masteru/subuland
+ {
+ char access[2 + subuname_len + 2 + 1];
+ strcpy(access, "u:");
+ strcpy(access + 2, subuname);
+ strcpy(access + 2 + subuname_len, ":x");
+
+ char *argv[5];
+ argv[0] = "/usr/bin/setfacl";
+ argv[1] = "-m";
+ argv[2] = access;
+ argv[3] = masteru_home;
+ argv[4] = (char *) NULL;
+ char *envp[1];
+ envp[0] = (char *) NULL;
+ if( dispatch(argv, envp) == -1 ){
+ fprintf(stderr, "'setfacl -m u:%s:x %s' returned an error.\n", subuname, masteru_home);
+ free(subuland);
+ free(subuhome);
+ return ERR_SETFACL;
+ }
+ }
+
+ //--------------------------------------------------------------------------------
+ // create subuhome directory
+ {
+ int ret = mkdir(subuhome, 0x0700);
+ if( ret == -1 ){
+ perror("subu_mk_0");
+ free(subuland);
+ free(subuhome);
+ return ERR_MK_SUBUHOME;
+ }
+ ret = chown(subuhome, subuuid, subugid);
+ if( ret == -1 ){
+ perror("subu_mk_0");
+ free(subuland);
+ free(subuhome);
+ return ERR_MK_SUBUHOME;
+ }
+ }
+
+ //--------------------------------------------------------------------------------
+ // give masteru access to subu_home and all descendents. This is why subu is
+ // said to be subservient.
+ // setfacl -R -m d:u:masteru:rwX,u:masteru:rwX subuhome
+ {
+ char access[4 + masteru_name_len + 7 + masteru_name_len + 5 + subuhome_len + 1];
+ strcpy(access, "d:u:");
+ strcpy(access + 4, masteru_name);
+ strcpy(access + 4 + masteru_name_len, ":rwX,u:");
+ strcpy(access + 4 + masteru_name_len + 7, masteru_name);
+ strcpy(access + 4 + masteru_name_len + 7 + masteru_name_len, ":rwX ");
+ strcpy(access + 4 + masteru_name_len + 7 + masteru_name_len + 5, subuhome);
+
+ char *argv[6];
+ argv[0] = "/usr/bin/setfacl";
+ argv[1] = "-R"; // just in case the dir already existed with stuff in it
+ argv[2] = "-m";
+ argv[3] = access;
+ argv[4] = subuhome;
+ argv[5] = (char *) NULL;
+ char *envp[1];
+ envp[0] = (char *) NULL;
+ if( dispatch(argv, envp) == -1 ){
+ fprintf
+ (
+ stderr,
+ "'setfacl -$ -m d:u:%s:rwX,u:%s:rwX %s' returned an error.\n",
+ masteru_name,
+ masteru_name,
+ subuhome
+ );
+ free(subuland);
+ free(subuhome);
+ return ERR_SETFACL;
+ }
+ }
+
+ free(subuland);
+ free(subuhome);
+ return 0;
+}
--- /dev/null
+#ifndef SUBU_MK_0_LIB_H
+#define SUBU_MK_0_LIB_H
+
+#define ERR_ARG_CNT 1
+#define ERR_SETUID_ROOT 2
+#define ERR_BAD_MASTERU_HOME 3
+#define ERR_NOT_EXIST_MASTERU_HOME 4
+#define ERR_NOT_EXIST_SUBULAND 5
+#define ERR_FAILED_MKDIR_SUBU 6
+#define ERR_FAILED_RESTORATION 7
+#define ERR_FAILED_USERADD 8
+#define ERR_SETFACL 9
+#define ERR_MALLOC 10
+#define ERR_MK_SUBUHOME 11
+
+int subu_mk_0(char *subuname);
+
+#endif
+++ /dev/null
-#!/usr/bin/python
-# see the help option for syntax
-# this script must be run from root or sudo
-#
-# on Fedora 29 os.getresuid returned all zeros for a script run from sudo.
-# Hence, I am using the environment variable SUDO_USER
-
-import getpass
-import os
-import sys
-import libuser
-from __future__ import print_function
-
-command = os.path.base(argv[0])
-
-#--------------------------------------------------------------------------------
-# utilities
-#
-def prn(str):
- print(str,end='')
-
-#--------------------------------------------------------------------------------
-# help
-#
-def help():
- print( command +
-""" [=help] [=version] [shell=<shell>][owner=<owner-username>] [subu=]<subu-username>
-Makes a subservient user.
-If no arguments are given, or if =help is given, this message is printed.
-When this command is invoked through sudo, $SUDO_USER is taken as the owner's username.
-Otherwise, when invoked directly from root, the owner= option must be provided.
-The subu-username argument is the username for the new subservient user
-The the new subu home directory is created in /home/owner/subu/.
-Facls are set to give the owner access to the new subu's home directory.
-The shell option is not implemented yet. Probably need a number of other options also.
-"""
- )
-
-def version():
- print(" version 0")
-
-#--------------------------------------------------------------------------------
-# a manager for handling error messages
-#
-class class_err:
-"""
-An error record has the form [flag, message, args]
- class is fatal, warning, info [currently not implemented]
- flag is true if an error has occured [need to change this to a count]
- args is an array of strings to be given after the error message is printed.
-
-The dict holds named error records.
-
-register() is used to name and place error records in the dict. register() is
-typically called multiple times to initialize and error instance.
-
-tattle() is used by the program at run time in order to signal errors.
-
-has_error() returns true if tattle was ever called
-
-report() prints an error report. When errors have occured this
-
-vector() [unimplemented] returns a bit vector with one bit per fatal error
-record, in the order they appear in the dictionary. The bit is set if the error
-ever occured.
-
-We check for as many errors as is convenient to do so rather than stopping on
-the first error.
-"""
-
- # field offsets into the error record
- flag_dex = 0;
- message_dex = 1;
- args_dex = 2;
-
- def __init__(self):
- self.total_cnt = 0
- self.dict = {}
-
- def register(name, message):
- self.dict[name] = [False, message, []]
-
- def tattle(name, *args):
- self.total_cnt += 1
- if name in self.dict:
- self.dict[name][0] = True
- self.dict[name][2].extend(args)
-
- def report():
- if self.total_cnt:
- for k,v in self.dict.items():
- if v[self.flag_dex]:
- print(v[self.message_dex],end='')
- args = v[self.args_dex]
- if length(args) :
- print(args[0],end='')
- for arg in args[1:]:
- print( " " + arg, end='')
- print()
-
-#--------------------------------------------------------------------------------
-# parse the command line
-#
-err.register(
- 'impossible_split',
- "It is not possible, yet this token split into other than one or two pieces: "
- )
-err.register(
- 'lone_delim',
- "No spaces should appear around the '=' delimiter."
- )
-
-args = sys.argv[1:]
-if len(args) == 0 :
- version()
- help()
- exit(1)
-
-#create a dictionary based on the command line arguments
-arg_dict = {}
-subu_cnt = 0
-delim = '='
-for token in args:
- token_pair = split(token, delim);
- if len(token_pair) == 1 : #means there was no '=' in the token
- arg_dict['subu'] = token_pair
- subu_cnt++
- elif len(token_pair) == 2 :
- if token_pair[0] == '' and token_pair[1] == '' :
- err.tattle('lone_delim')
- elif token_pair[1] == '' : # then has trailing delim, will treat the same as a leading delim
- arg_dict[token_pair[0]] = None
- elif token_pair[0] == '' : # then has leading delim
- arg_dict[token_pair[1]] = None
- else:
- arg_dict[token_pair[0]] = token_pair[1]
- else:
- err.tattle('impossible_split', token)
-
-if not arg_dict or arg_dict.get('help'):
- help()
- err.report()
- exit(1)
-
-if arg_dict.get('version'):
- version()
-
-#--------------------------------------------------------------------------------
-# check that the command line arguments are well formed.
-#
-err.register(
- 'too_many_args',
- command + " takes at most one non-option argument, but we counted: "
- )
-err.register(
- 'no_subu'
- command + " missing subservient username."
- )
-err.register(
- 'bad_username'
- "Usernames match ^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$, but found: "
- )
-err.register(
- 'unknown_option'
- command + " doesn't implement option: "
- )
-
-subu = arg_dict.get('subu')
-if subu_cnt > 1:
- err.tattle('too_many_args')
-elif not subu
- err.tattle('no_subu')
-elif not re.match("^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$", subu)
- err.tattle('bad_username', subu)
-
-for k in arg_dict:
- if k not in ['help', 'version', 'shell', 'owner', 'subu'] :
- err.tattle('unkown_option', k)
-
-if arg_dict.get('shell') :
- print "shell option aint implemented yet"
-
-
-
-#--------------------------------------------------------------------------------
-# check that we have root privilege
-#
-err.register(
- 'not_root'
- command + "requires root privilege"
- )
-
-uid = os.getuid()
-if uid != 0 :
- err.tattle('not root')
-
-username = getpass.getuser()
-sudo_caller_username = os.environ.get('SUDO_USER')
-
-if !sudo_caller_username
- if username not == "root":
- err.tattle('not_root')
- elif:
- owner
-
-
- def has_error(*errs):
- return self.cnt > 0
-
-
-
-#-----
-
-
-
-
-#--------------------------------------------------------------------------------
-# pull out the owner_dir and subu_dir
-#
-admin= libuser.admin()
-
-err_arg_form = class_err()
-err_arg_form.register('too_many', "too many semicolon delineated parts in")
-
-owner_parts = args[0].split(":")
-subu_parts = args[1].split(":")
-
-owner_user_name = owner_parts[0]
-if not owner_user_name:
- err_arg_form.tattle('owner_user_name_missing', args[0])
-else:
- owner_user = admin.lookupUserByName(owner_user_name)
- if owner_user == None:
- err_arg_form.tattle('no_such_user_name', owner_user_name)
- else:
-
-
-subu_user_name = subu_parts[0]
-
-
-if length(owner_parts) > 2:
- err_arg_form.tattle('too_many', args[0])
-elif length(owner_parts) == 2:
- owner_dir = owner_parts[1]
-else # get the home directory
-
-
-
-
-
-#--------------------------------------------------------------------------------
-# set the home directory
-#
-if len(args) > args_dir_index:
- dir = args[args_dir_index]
-else:
- dir = os.getcwd()
-
-home = dir + "/" + name
-home_flag = not os.path.exists(home)
-
-#--------------------------------------------------------------------------------
-# create the user, setfacls
-#
-err_cnt = 0
-name_available_flag = False
-
-if name_flag:
- admin = libuser.admin()
- name_available_flag = name not in admin.enumeratedUsers()
-
-if owner_flag and name_flag and name_available_flag and home_flag :
- user = admin.initUser(name)
- user[libuser.HOMEDIRECTORY] = home
- if opt_shell : user[libuser.SHELL] = opt_shell
- admin.addUser(user)
- #setfacl -m d:u:plato:rwx,u:plato:rwx directory
- setfacl = "setfacl -m d:u:" + name + ":rwx,u:" + name + ":rwx " + home
- exit(0)
-
-#--------------------------------------------------------------------------------
-# error return
-# .. need to grab the return code from setfacl above and delete the user if it fails
-#
-err_flags = 0
-if not owner_flag :
- err_flags |= 2**2
- print "missing owning username argument"
-if not name_flag :
- err_flags |= 2**3
- print name + "missing subservient username argument"
-if not name_available_flag :
- err_flags |= 2**4
- print name + "specified subservient username already exists"
-if not home_flag :
- err_flags |= 2**5
- print "user home directory already exists"
-
-exit(err_flags)
--- /dev/null
+#!/usr/bin/python
+# see the help option for syntax
+# this script must be run from root or sudo
+#
+# on Fedora 29 os.getresuid returned all zeros for a script run from sudo.
+# Hence, I am using the environment variable SUDO_USER
+
+import getpass
+import os
+import sys
+import libuser
+from __future__ import print_function
+
+command = os.path.base(argv[0])
+
+#--------------------------------------------------------------------------------
+# utilities
+#
+def prn(str):
+ print(str,end='')
+
+#--------------------------------------------------------------------------------
+# help
+#
+def help():
+ print( command +
+""" [=help] [=version] [shell=<shell>][owner=<owner-username>] [subu=]<subu-username>
+Makes a subservient user.
+If no arguments are given, or if =help is given, this message is printed.
+When this command is invoked through sudo, $SUDO_USER is taken as the owner's username.
+Otherwise, when invoked directly from root, the owner= option must be provided.
+The subu-username argument is the username for the new subservient user
+The the new subu home directory is created in /home/owner/subu/.
+Facls are set to give the owner access to the new subu's home directory.
+The shell option is not implemented yet. Probably need a number of other options also.
+"""
+ )
+
+def version():
+ print(" version 0")
+
+#--------------------------------------------------------------------------------
+# a manager for handling error messages
+#
+class class_err:
+"""
+An error record has the form [flag, message, args]
+ class is fatal, warning, info [currently not implemented]
+ flag is true if an error has occured [need to change this to a count]
+ args is an array of strings to be given after the error message is printed.
+
+The dict holds named error records.
+
+register() is used to name and place error records in the dict. register() is
+typically called multiple times to initialize and error instance.
+
+tattle() is used by the program at run time in order to signal errors.
+
+has_error() returns true if tattle was ever called
+
+report() prints an error report. When errors have occured this
+
+vector() [unimplemented] returns a bit vector with one bit per fatal error
+record, in the order they appear in the dictionary. The bit is set if the error
+ever occured.
+
+We check for as many errors as is convenient to do so rather than stopping on
+the first error.
+"""
+
+ # field offsets into the error record
+ flag_dex = 0;
+ message_dex = 1;
+ args_dex = 2;
+
+ def __init__(self):
+ self.total_cnt = 0
+ self.dict = {}
+
+ def register(name, message):
+ self.dict[name] = [False, message, []]
+
+ def tattle(name, *args):
+ self.total_cnt += 1
+ if name in self.dict:
+ self.dict[name][0] = True
+ self.dict[name][2].extend(args)
+
+ def report():
+ if self.total_cnt:
+ for k,v in self.dict.items():
+ if v[self.flag_dex]:
+ print(v[self.message_dex],end='')
+ args = v[self.args_dex]
+ if length(args) :
+ print(args[0],end='')
+ for arg in args[1:]:
+ print( " " + arg, end='')
+ print()
+
+#--------------------------------------------------------------------------------
+# parse the command line
+#
+err.register(
+ 'impossible_split',
+ "It is not possible, yet this token split into other than one or two pieces: "
+ )
+err.register(
+ 'lone_delim',
+ "No spaces should appear around the '=' delimiter."
+ )
+
+args = sys.argv[1:]
+if len(args) == 0 :
+ version()
+ help()
+ exit(1)
+
+#create a dictionary based on the command line arguments
+arg_dict = {}
+subu_cnt = 0
+delim = '='
+for token in args:
+ token_pair = split(token, delim);
+ if len(token_pair) == 1 : #means there was no '=' in the token
+ arg_dict['subu'] = token_pair
+ subu_cnt++
+ elif len(token_pair) == 2 :
+ if token_pair[0] == '' and token_pair[1] == '' :
+ err.tattle('lone_delim')
+ elif token_pair[1] == '' : # then has trailing delim, will treat the same as a leading delim
+ arg_dict[token_pair[0]] = None
+ elif token_pair[0] == '' : # then has leading delim
+ arg_dict[token_pair[1]] = None
+ else:
+ arg_dict[token_pair[0]] = token_pair[1]
+ else:
+ err.tattle('impossible_split', token)
+
+if not arg_dict or arg_dict.get('help'):
+ help()
+ err.report()
+ exit(1)
+
+if arg_dict.get('version'):
+ version()
+
+#--------------------------------------------------------------------------------
+# check that the command line arguments are well formed.
+#
+err.register(
+ 'too_many_args',
+ command + " takes at most one non-option argument, but we counted: "
+ )
+err.register(
+ 'no_subu'
+ command + " missing subservient username."
+ )
+err.register(
+ 'bad_username'
+ "Usernames match ^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$, but found: "
+ )
+err.register(
+ 'unknown_option'
+ command + " doesn't implement option: "
+ )
+
+subu = arg_dict.get('subu')
+if subu_cnt > 1:
+ err.tattle('too_many_args')
+elif not subu
+ err.tattle('no_subu')
+elif not re.match("^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$", subu)
+ err.tattle('bad_username', subu)
+
+for k in arg_dict:
+ if k not in ['help', 'version', 'shell', 'owner', 'subu'] :
+ err.tattle('unkown_option', k)
+
+if arg_dict.get('shell') :
+ print "shell option aint implemented yet"
+
+
+
+#--------------------------------------------------------------------------------
+# check that we have root privilege
+#
+err.register(
+ 'not_root'
+ command + "requires root privilege"
+ )
+
+uid = os.getuid()
+if uid != 0 :
+ err.tattle('not root')
+
+username = getpass.getuser()
+sudo_caller_username = os.environ.get('SUDO_USER')
+
+if !sudo_caller_username
+ if username not == "root":
+ err.tattle('not_root')
+ elif:
+ owner
+
+
+ def has_error(*errs):
+ return self.cnt > 0
+
+
+
+#-----
+
+
+
+
+#--------------------------------------------------------------------------------
+# pull out the owner_dir and subu_dir
+#
+admin= libuser.admin()
+
+err_arg_form = class_err()
+err_arg_form.register('too_many', "too many semicolon delineated parts in")
+
+owner_parts = args[0].split(":")
+subu_parts = args[1].split(":")
+
+owner_user_name = owner_parts[0]
+if not owner_user_name:
+ err_arg_form.tattle('owner_user_name_missing', args[0])
+else:
+ owner_user = admin.lookupUserByName(owner_user_name)
+ if owner_user == None:
+ err_arg_form.tattle('no_such_user_name', owner_user_name)
+ else:
+
+
+subu_user_name = subu_parts[0]
+
+
+if length(owner_parts) > 2:
+ err_arg_form.tattle('too_many', args[0])
+elif length(owner_parts) == 2:
+ owner_dir = owner_parts[1]
+else # get the home directory
+
+
+
+
+
+#--------------------------------------------------------------------------------
+# set the home directory
+#
+if len(args) > args_dir_index:
+ dir = args[args_dir_index]
+else:
+ dir = os.getcwd()
+
+home = dir + "/" + name
+home_flag = not os.path.exists(home)
+
+#--------------------------------------------------------------------------------
+# create the user, setfacls
+#
+err_cnt = 0
+name_available_flag = False
+
+if name_flag:
+ admin = libuser.admin()
+ name_available_flag = name not in admin.enumeratedUsers()
+
+if owner_flag and name_flag and name_available_flag and home_flag :
+ user = admin.initUser(name)
+ user[libuser.HOMEDIRECTORY] = home
+ if opt_shell : user[libuser.SHELL] = opt_shell
+ admin.addUser(user)
+ #setfacl -m d:u:plato:rwx,u:plato:rwx directory
+ setfacl = "setfacl -m d:u:" + name + ":rwx,u:" + name + ":rwx " + home
+ exit(0)
+
+#--------------------------------------------------------------------------------
+# error return
+# .. need to grab the return code from setfacl above and delete the user if it fails
+#
+err_flags = 0
+if not owner_flag :
+ err_flags |= 2**2
+ print "missing owning username argument"
+if not name_flag :
+ err_flags |= 2**3
+ print name + "missing subservient username argument"
+if not name_available_flag :
+ err_flags |= 2**4
+ print name + "specified subservient username already exists"
+if not home_flag :
+ err_flags |= 2**5
+ print "user home directory already exists"
+
+exit(err_flags)