]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib: Merge libmisc into libshadow
authorAlejandro Colomar <alx@kernel.org>
Mon, 28 Aug 2023 10:54:22 +0000 (12:54 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Thu, 31 Aug 2023 06:55:26 +0000 (08:55 +0200)
The separation was unnecessary, and caused build problems.  Let's go
wild and obliterate the library.  The files are moved to libshadow.

Scripted change:

$ find libmisc/ -type f \
| grep '\.[chy]$' \
| xargs mv -t lib;

Plus updating the Makefile and other references.  While at it, I've
sorted the sources lists.

Link: <https://github.com/shadow-maint/shadow/pull/792>
Reported-by: David Seifert <soap@gentoo.org>
Cc: Sam James <sam@gentoo.org>
Cc: Christian Bricart <christian@bricart.de>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Robert Förster <Dessa@gmake.de>
[ soap tested the Gentoo package ]
Tested-by: David Seifert <soap@gentoo.org>
Acked-by: David Seifert <soap@gentoo.org>
Acked-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Iker Pedrosa <ipedrosa@redhat.com>
Acked-by: <lslebodn@fedoraproject.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
91 files changed:
.gitignore
Makefile.am
TODO
configure.ac
lib/Makefile.am
lib/addgrps.c [moved from libmisc/addgrps.c with 100% similarity]
lib/age.c [moved from libmisc/age.c with 100% similarity]
lib/agetpass.c [moved from libmisc/agetpass.c with 100% similarity]
lib/audit_help.c [moved from libmisc/audit_help.c with 100% similarity]
lib/basename.c [moved from libmisc/basename.c with 100% similarity]
lib/btrfs.c [moved from libmisc/btrfs.c with 100% similarity]
lib/chkname.c [moved from libmisc/chkname.c with 100% similarity]
lib/chkname.h [moved from libmisc/chkname.h with 100% similarity]
lib/chowndir.c [moved from libmisc/chowndir.c with 100% similarity]
lib/chowntty.c [moved from libmisc/chowntty.c with 100% similarity]
lib/cleanup.c [moved from libmisc/cleanup.c with 100% similarity]
lib/cleanup_group.c [moved from libmisc/cleanup_group.c with 100% similarity]
lib/cleanup_user.c [moved from libmisc/cleanup_user.c with 100% similarity]
lib/console.c [moved from libmisc/console.c with 100% similarity]
lib/copydir.c [moved from libmisc/copydir.c with 100% similarity]
lib/csrand.c [moved from libmisc/csrand.c with 100% similarity]
lib/date_to_str.c [moved from libmisc/date_to_str.c with 100% similarity]
lib/entry.c [moved from libmisc/entry.c with 100% similarity]
lib/env.c [moved from libmisc/env.c with 100% similarity]
lib/failure.c [moved from libmisc/failure.c with 100% similarity]
lib/failure.h [moved from libmisc/failure.h with 100% similarity]
lib/find_new_gid.c [moved from libmisc/find_new_gid.c with 100% similarity]
lib/find_new_sub_gids.c [moved from libmisc/find_new_sub_gids.c with 100% similarity]
lib/find_new_sub_uids.c [moved from libmisc/find_new_sub_uids.c with 100% similarity]
lib/find_new_uid.c [moved from libmisc/find_new_uid.c with 100% similarity]
lib/freezero.c [moved from libmisc/freezero.c with 100% similarity]
lib/freezero.h [moved from libmisc/freezero.h with 100% similarity]
lib/getdate.h [moved from libmisc/getdate.h with 100% similarity]
lib/getdate.y [moved from libmisc/getdate.y with 100% similarity]
lib/getgr_nam_gid.c [moved from libmisc/getgr_nam_gid.c with 100% similarity]
lib/getrange.c [moved from libmisc/getrange.c with 100% similarity]
lib/gettime.c [moved from libmisc/gettime.c with 100% similarity]
lib/hushed.c [moved from libmisc/hushed.c with 100% similarity]
lib/idmapping.c [moved from libmisc/idmapping.c with 100% similarity]
lib/idmapping.h [moved from libmisc/idmapping.h with 100% similarity]
lib/isexpired.c [moved from libmisc/isexpired.c with 100% similarity]
lib/limits.c [moved from libmisc/limits.c with 100% similarity]
lib/list.c [moved from libmisc/list.c with 100% similarity]
lib/log.c [moved from libmisc/log.c with 100% similarity]
lib/logind.c [moved from libmisc/logind.c with 100% similarity]
lib/loginprompt.c [moved from libmisc/loginprompt.c with 100% similarity]
lib/mail.c [moved from libmisc/mail.c with 100% similarity]
lib/motd.c [moved from libmisc/motd.c with 100% similarity]
lib/myname.c [moved from libmisc/myname.c with 100% similarity]
lib/obscure.c [moved from libmisc/obscure.c with 100% similarity]
lib/pam_pass.c [moved from libmisc/pam_pass.c with 100% similarity]
lib/pam_pass_non_interactive.c [moved from libmisc/pam_pass_non_interactive.c with 100% similarity]
lib/prefix_flag.c [moved from libmisc/prefix_flag.c with 100% similarity]
lib/prototypes.h
lib/pwd2spwd.c [moved from libmisc/pwd2spwd.c with 100% similarity]
lib/pwd_init.c [moved from libmisc/pwd_init.c with 100% similarity]
lib/pwdcheck.c [moved from libmisc/pwdcheck.c with 100% similarity]
lib/readpassphrase.c [moved from libmisc/readpassphrase.c with 100% similarity]
lib/readpassphrase.h [moved from libmisc/readpassphrase.h with 100% similarity]
lib/remove_tree.c [moved from libmisc/remove_tree.c with 100% similarity]
lib/rlogin.c [moved from libmisc/rlogin.c with 100% similarity]
lib/root_flag.c [moved from libmisc/root_flag.c with 100% similarity]
lib/salt.c [moved from libmisc/salt.c with 100% similarity]
lib/setugid.c [moved from libmisc/setugid.c with 100% similarity]
lib/setupenv.c [moved from libmisc/setupenv.c with 100% similarity]
lib/shell.c [moved from libmisc/shell.c with 100% similarity]
lib/strtoday.c [moved from libmisc/strtoday.c with 100% similarity]
lib/sub.c [moved from libmisc/sub.c with 100% similarity]
lib/sulog.c [moved from libmisc/sulog.c with 100% similarity]
lib/ttytype.c [moved from libmisc/ttytype.c with 100% similarity]
lib/tz.c [moved from libmisc/tz.c with 100% similarity]
lib/ulimit.c [moved from libmisc/ulimit.c with 100% similarity]
lib/user_busy.c [moved from libmisc/user_busy.c with 100% similarity]
lib/utmp.c [moved from libmisc/utmp.c with 100% similarity]
lib/valid.c [moved from libmisc/valid.c with 100% similarity]
lib/xgetXXbyYY.c [moved from libmisc/xgetXXbyYY.c with 100% similarity]
lib/xgetgrgid.c [moved from libmisc/xgetgrgid.c with 100% similarity]
lib/xgetgrnam.c [moved from libmisc/xgetgrnam.c with 100% similarity]
lib/xgetpwnam.c [moved from libmisc/xgetpwnam.c with 100% similarity]
lib/xgetpwuid.c [moved from libmisc/xgetpwuid.c with 100% similarity]
lib/xgetspnam.c [moved from libmisc/xgetspnam.c with 100% similarity]
lib/xprefix_getpwnam.c [moved from libmisc/xprefix_getpwnam.c with 100% similarity]
lib/yesno.c [moved from libmisc/yesno.c with 100% similarity]
libmisc/.indent.pro [deleted file]
libmisc/Makefile.am [deleted file]
libsubid/Makefile.am
po/POTFILES.in
src/Makefile.am
src/su.c
tests/common/config.sh
tests/libsubid/04_nss/Makefile

index fee9c06185035a4e83ea8c0918e6cf0a052a8ee8..b362cfe1bd401d49d458653fe58be84dbfa24480 100644 (file)
@@ -47,5 +47,5 @@ Makefile.in
 
 /shadow.spec
 /shadow-*.tar.*
-/libmisc/getdate.c
+/lib/getdate.c
 /libsubid/subid.h
index 630e2aa9c3ebf25fa10c5b94305393c77be24f72..d8dfc3bf7db7f56b6cd0beed8857456bf236b098 100644 (file)
@@ -2,7 +2,7 @@
 
 EXTRA_DIST = NEWS README TODO shadow.spec.in
 
-SUBDIRS = libmisc lib
+SUBDIRS = lib
 
 if ENABLE_SUBIDS
 SUBDIRS += libsubid
diff --git a/TODO b/TODO
index 8783ccd130f3bd294bbaa2e492efaa7a768c94b3..62571f5fdb10847b21ba973128f5e994c27a3aee 100644 (file)
--- a/TODO
+++ b/TODO
 
 Check when RLOGIN is enabled if ruserok() exists
 
-Move selinux_file_context out of libmisc/copydir.c
+Move selinux_file_context out of lib/copydir.c
 
 Review hardcoded root account?
 
 review all call to strto
 
-libmisc/cleanup_user.c
+lib/cleanup_user.c
        cleanup needed (cleanup_report_add_user* not used)
 
 
index f4fadc52b8628daaceaaa9c35ef5119a1cce6cc5..b3bbf57d84f6fd5fb8c5949a014c33b199af0471 100644 (file)
@@ -753,7 +753,6 @@ AC_CONFIG_FILES([
        man/uk/Makefile
        man/zh_CN/Makefile
        man/zh_TW/Makefile
-       libmisc/Makefile
        lib/Makefile
        libsubid/Makefile
        libsubid/subid.h
index 7f3f7f6390e903f5ccedc34851071def86e087b8..ca73313dc242f103c9d00918b3644e60ca5f6286 100644 (file)
@@ -5,64 +5,117 @@ DEFS =
 
 noinst_LTLIBRARIES = libshadow.la
 
+if USE_PAM
+LIBCRYPT_PAM = $(LIBCRYPT)
+else
+LIBCRYPT_PAM =
+endif
+
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
+
 libshadow_la_CPPFLAGS = $(ECONF_CPPFLAGS)
 if HAVE_VENDORDIR
 libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\"
 endif
 
 libshadow_la_CPPFLAGS += -I$(top_srcdir)
-libshadow_la_CFLAGS = $(LIBBSD_CFLAGS)
+libshadow_la_CFLAGS = $(LIBBSD_CFLAGS) $(LIBCRYPT_PAM) $(LIBSYSTEMD)
 
 libshadow_la_SOURCES = \
+       addgrps.c \
+       age.c \
+       agetpass.c \
        alloc.c \
        alloc.h \
+       audit_help.c \
+       basename.c \
        bit.c \
        bit.h \
+       chkname.c \
+       chkname.h \
+       chowndir.c \
+       chowntty.c \
+       cleanup.c \
+       cleanup_group.c \
+       cleanup_user.c \
        commonio.c \
        commonio.h \
+       console.c \
+       copydir.c \
+       csrand.c \
+       date_to_str.c \
        defines.h \
        encrypt.c \
+       entry.c \
+       env.c \
        exitcodes.h \
        faillog.h \
+       failure.c \
+       failure.h \
        fields.c \
+       find_new_gid.c \
+       find_new_uid.c \
+       find_new_sub_gids.c \
+       find_new_sub_uids.c \
        fputsx.c \
-       getdef.c \
-       getdef.h \
        get_gid.c \
-       getlong.c \
        get_pid.c \
        get_uid.c \
+       getdate.h \
+       getdate.y \
+       getdef.c \
+       getdef.h \
+       getlong.c \
+       getgr_nam_gid.c \
+       getrange.c \
+       gettime.c \
        getulong.c \
        groupio.c \
        groupmem.c \
        groupio.h \
        gshadow.c \
+       hushed.c \
+       idmapping.h \
+       idmapping.c \
+       isexpired.c \
+       limits.c \
+       list.c \
        lockpw.c \
+       loginprompt.c \
+       mail.c \
        mempcpy.c \
        mempcpy.h \
+       motd.c \
+       myname.c \
        nss.c \
        nscd.c \
        nscd.h \
-       shadowlog.c \
-       shadowlog.h \
-       shadowlog_internal.h \
-       sssd.c \
-       sssd.h \
+       obscure.c \
        pam_defs.h \
+       pam_pass.c \
+       pam_pass_non_interactive.c \
        port.c \
        port.h \
+       prefix_flag.c \
        prototypes.h \
        pwauth.c \
        pwauth.h \
        pwio.c \
        pwio.h \
+       pwd_init.c \
+       pwd2spwd.c \
+       pwdcheck.c \
        pwmem.c \
+       remove_tree.c \
+       rlogin.c \
+       root_flag.c \
        run_part.h \
        run_part.c \
-       subordinateio.h \
-       subordinateio.c \
+       salt.c \
        selinux.c \
        semanage.c \
+       setugid.c \
+       setupenv.c \
        sgetgrent.c \
        sgetpwent.c \
        sgetspent.c \
@@ -71,18 +124,63 @@ libshadow_la_SOURCES = \
        shadow.c \
        shadowio.c \
        shadowio.h \
+       shadowlog.c \
+       shadowlog.h \
+       shadowlog_internal.h \
        shadowmem.c \
+       shell.c \
        spawn.c \
+       sssd.c \
+       sssd.h \
        stpecpy.c \
        stpecpy.h \
        stpeprintf.c \
        stpeprintf.h \
-       write_full.c
+       strtoday.c \
+       sub.c \
+       subordinateio.h \
+       subordinateio.c \
+       sulog.c \
+       ttytype.c \
+       tz.c \
+       ulimit.c \
+       user_busy.c \
+       valid.c \
+       write_full.c \
+       xgetpwnam.c \
+       xprefix_getpwnam.c \
+       xgetpwuid.c \
+       xgetgrnam.c \
+       xgetgrgid.c \
+       xgetspnam.c \
+       yesno.c
 
 if WITH_TCB
 libshadow_la_SOURCES += tcbfuncs.c tcbfuncs.h
 endif
 
+if WITH_BTRFS
+libshadow_la_SOURCES += btrfs.c
+endif
+
+if ENABLE_LASTLOG
+libshadow_la_SOURCES += log.c
+endif
+
+if ENABLE_LOGIND
+libshadow_la_SOURCES += logind.c
+else
+libshadow_la_SOURCES += utmp.c
+endif
+
+if !WITH_LIBBSD
+libshadow_la_SOURCES += \
+       freezero.h \
+       freezero.c \
+       readpassphrase.h \
+       readpassphrase.c
+endif
+
 # These files are unneeded for some reason, listed in
 # order of appearance:
 #
@@ -90,4 +188,5 @@ endif
 
 EXTRA_DIST = \
        .indent.pro \
-       gshadow_.h
+       gshadow_.h \
+       xgetXXbyYY.c
similarity index 100%
rename from libmisc/addgrps.c
rename to lib/addgrps.c
similarity index 100%
rename from libmisc/age.c
rename to lib/age.c
similarity index 100%
rename from libmisc/agetpass.c
rename to lib/agetpass.c
similarity index 100%
rename from libmisc/audit_help.c
rename to lib/audit_help.c
similarity index 100%
rename from libmisc/basename.c
rename to lib/basename.c
similarity index 100%
rename from libmisc/btrfs.c
rename to lib/btrfs.c
similarity index 100%
rename from libmisc/chkname.c
rename to lib/chkname.c
similarity index 100%
rename from libmisc/chkname.h
rename to lib/chkname.h
similarity index 100%
rename from libmisc/chowndir.c
rename to lib/chowndir.c
similarity index 100%
rename from libmisc/chowntty.c
rename to lib/chowntty.c
similarity index 100%
rename from libmisc/cleanup.c
rename to lib/cleanup.c
similarity index 100%
rename from libmisc/cleanup_group.c
rename to lib/cleanup_group.c
similarity index 100%
rename from libmisc/cleanup_user.c
rename to lib/cleanup_user.c
similarity index 100%
rename from libmisc/console.c
rename to lib/console.c
similarity index 100%
rename from libmisc/copydir.c
rename to lib/copydir.c
similarity index 100%
rename from libmisc/csrand.c
rename to lib/csrand.c
similarity index 100%
rename from libmisc/date_to_str.c
rename to lib/date_to_str.c
similarity index 100%
rename from libmisc/entry.c
rename to lib/entry.c
similarity index 100%
rename from libmisc/env.c
rename to lib/env.c
similarity index 100%
rename from libmisc/failure.c
rename to lib/failure.c
similarity index 100%
rename from libmisc/failure.h
rename to lib/failure.h
similarity index 100%
rename from libmisc/find_new_gid.c
rename to lib/find_new_gid.c
similarity index 100%
rename from libmisc/find_new_uid.c
rename to lib/find_new_uid.c
similarity index 100%
rename from libmisc/freezero.c
rename to lib/freezero.c
similarity index 100%
rename from libmisc/freezero.h
rename to lib/freezero.h
similarity index 100%
rename from libmisc/getdate.h
rename to lib/getdate.h
similarity index 100%
rename from libmisc/getdate.y
rename to lib/getdate.y
similarity index 100%
rename from libmisc/getgr_nam_gid.c
rename to lib/getgr_nam_gid.c
similarity index 100%
rename from libmisc/getrange.c
rename to lib/getrange.c
similarity index 100%
rename from libmisc/gettime.c
rename to lib/gettime.c
similarity index 100%
rename from libmisc/hushed.c
rename to lib/hushed.c
similarity index 100%
rename from libmisc/idmapping.c
rename to lib/idmapping.c
similarity index 100%
rename from libmisc/idmapping.h
rename to lib/idmapping.h
similarity index 100%
rename from libmisc/isexpired.c
rename to lib/isexpired.c
similarity index 100%
rename from libmisc/limits.c
rename to lib/limits.c
similarity index 100%
rename from libmisc/list.c
rename to lib/list.c
similarity index 100%
rename from libmisc/log.c
rename to lib/log.c
similarity index 100%
rename from libmisc/logind.c
rename to lib/logind.c
similarity index 100%
rename from libmisc/loginprompt.c
rename to lib/loginprompt.c
similarity index 100%
rename from libmisc/mail.c
rename to lib/mail.c
similarity index 100%
rename from libmisc/motd.c
rename to lib/motd.c
similarity index 100%
rename from libmisc/myname.c
rename to lib/myname.c
similarity index 100%
rename from libmisc/obscure.c
rename to lib/obscure.c
similarity index 100%
rename from libmisc/pam_pass.c
rename to lib/pam_pass.c
similarity index 100%
rename from libmisc/prefix_flag.c
rename to lib/prefix_flag.c
index 47ed2ca1cdba7886774890d4f2f66ede86e99c26..25ee3a0934440d3c6aff2bc4a9fedb0a697c618c 100644 (file)
@@ -10,7 +10,7 @@
 /*
  * prototypes.h
  *
- * prototypes of libmisc functions, and private lib functions.
+ * prototypes of some lib functions, and private lib functions.
  *
  * $Id$
  *
similarity index 100%
rename from libmisc/pwd2spwd.c
rename to lib/pwd2spwd.c
similarity index 100%
rename from libmisc/pwd_init.c
rename to lib/pwd_init.c
similarity index 100%
rename from libmisc/pwdcheck.c
rename to lib/pwdcheck.c
similarity index 100%
rename from libmisc/remove_tree.c
rename to lib/remove_tree.c
similarity index 100%
rename from libmisc/rlogin.c
rename to lib/rlogin.c
similarity index 100%
rename from libmisc/root_flag.c
rename to lib/root_flag.c
similarity index 100%
rename from libmisc/salt.c
rename to lib/salt.c
similarity index 100%
rename from libmisc/setugid.c
rename to lib/setugid.c
similarity index 100%
rename from libmisc/setupenv.c
rename to lib/setupenv.c
similarity index 100%
rename from libmisc/shell.c
rename to lib/shell.c
similarity index 100%
rename from libmisc/strtoday.c
rename to lib/strtoday.c
similarity index 100%
rename from libmisc/sub.c
rename to lib/sub.c
similarity index 100%
rename from libmisc/sulog.c
rename to lib/sulog.c
similarity index 100%
rename from libmisc/ttytype.c
rename to lib/ttytype.c
similarity index 100%
rename from libmisc/tz.c
rename to lib/tz.c
similarity index 100%
rename from libmisc/ulimit.c
rename to lib/ulimit.c
similarity index 100%
rename from libmisc/user_busy.c
rename to lib/user_busy.c
similarity index 100%
rename from libmisc/utmp.c
rename to lib/utmp.c
similarity index 100%
rename from libmisc/valid.c
rename to lib/valid.c
similarity index 100%
rename from libmisc/xgetXXbyYY.c
rename to lib/xgetXXbyYY.c
similarity index 100%
rename from libmisc/xgetgrgid.c
rename to lib/xgetgrgid.c
similarity index 100%
rename from libmisc/xgetgrnam.c
rename to lib/xgetgrnam.c
similarity index 100%
rename from libmisc/xgetpwnam.c
rename to lib/xgetpwnam.c
similarity index 100%
rename from libmisc/xgetpwuid.c
rename to lib/xgetpwuid.c
similarity index 100%
rename from libmisc/xgetspnam.c
rename to lib/xgetspnam.c
similarity index 100%
rename from libmisc/yesno.c
rename to lib/yesno.c
diff --git a/libmisc/.indent.pro b/libmisc/.indent.pro
deleted file mode 100644 (file)
index fe572bb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
--kr
--i8
--bad
--pcs
--l80
diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
deleted file mode 100644 (file)
index 5eba465..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-
-EXTRA_DIST = .indent.pro xgetXXbyYY.c
-
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
-
-noinst_LTLIBRARIES = libmisc.la
-
-if USE_PAM
-LIBCRYPT_PAM = $(LIBCRYPT)
-else
-LIBCRYPT_PAM =
-endif
-
-libmisc_la_CFLAGS = $(LIBBSD_CFLAGS) $(LIBCRYPT_PAM) $(LIBSYSTEMD)
-libmisc_la_SOURCES = \
-       addgrps.c \
-       age.c \
-       agetpass.c \
-       audit_help.c \
-       basename.c \
-       chkname.c \
-       chkname.h \
-       chowndir.c \
-       chowntty.c \
-       cleanup.c \
-       cleanup_group.c \
-       cleanup_user.c \
-       console.c \
-       copydir.c \
-       date_to_str.c \
-       entry.c \
-       env.c \
-       failure.c \
-       failure.h \
-       find_new_gid.c \
-       find_new_uid.c \
-       find_new_sub_gids.c \
-       find_new_sub_uids.c \
-       getdate.h \
-       getdate.y \
-       getgr_nam_gid.c \
-       getrange.c \
-       gettime.c \
-       hushed.c \
-       idmapping.h \
-       idmapping.c \
-       isexpired.c \
-       limits.c \
-       list.c \
-       loginprompt.c \
-       mail.c \
-       motd.c \
-       myname.c \
-       obscure.c \
-       pam_pass.c \
-       pam_pass_non_interactive.c \
-       prefix_flag.c \
-       pwd2spwd.c \
-       pwdcheck.c \
-       pwd_init.c \
-       csrand.c \
-       remove_tree.c \
-       rlogin.c \
-       root_flag.c \
-       salt.c \
-       setugid.c \
-       setupenv.c \
-       shell.c \
-       strtoday.c \
-       sub.c \
-       sulog.c \
-       ttytype.c \
-       tz.c \
-       ulimit.c \
-       user_busy.c \
-       valid.c \
-       xgetpwnam.c \
-       xprefix_getpwnam.c \
-       xgetpwuid.c \
-       xgetgrnam.c \
-       xgetgrgid.c \
-       xgetspnam.c \
-       yesno.c
-
-if WITH_BTRFS
-libmisc_la_SOURCES += btrfs.c
-endif
-
-if ENABLE_LASTLOG
-libmisc_la_SOURCES += log.c
-endif
-
-if ENABLE_LOGIND
-libmisc_la_SOURCES += logind.c
-else
-libmisc_la_SOURCES += utmp.c
-endif
-
-if !WITH_LIBBSD
-libmisc_la_SOURCES += \
-       freezero.h \
-       freezero.c \
-       readpassphrase.h \
-       readpassphrase.c
-endif
index 09ec3416dbd6de81880c41af2864c198519e335e..5ba0ab357274f3f0692cfa3c4188f4aa1ed935b9 100644 (file)
@@ -21,10 +21,8 @@ MISCLIBS = \
 
 libsubid_la_LIBADD = \
        $(top_builddir)/lib/libshadow.la \
-       $(top_builddir)/libmisc/libmisc.la \
        $(MISCLIBS) -ldl
 
 AM_CPPFLAGS = \
        -I${top_srcdir}/lib \
-       -I${top_srcdir}/libmisc \
        -DLOCALEDIR=\"$(datadir)/locale\"
index 0b318a5fe5eb52c8e39de6607becbcdfec7b2189..d6c877519061b46edbfa4944f2dfa278c43f5c2a 100644 (file)
@@ -1,24 +1,68 @@
 # List of files which contain translatable strings.
 
+lib/addgrps.c
+lib/age.c
+lib/audit_help.c
+lib/basename.c
+lib/chkname.c
+lib/chowndir.c
+lib/chowntty.c
+lib/cleanup.c
+lib/cleanup_group.c
+lib/cleanup_user.c
 lib/commonio.c
+lib/console.c
+lib/copydir.c
+lib/date_to_str.c
 lib/encrypt.c
+lib/entry.c
+lib/env.c
+lib/failure.c
 lib/fields.c
+lib/find_new_gid.c
+lib/find_new_sub_gids.c
+lib/find_new_sub_uids.c
+lib/find_new_uid.c
 lib/fputsx.c
-lib/getdef.c
 lib/get_gid.c
-lib/getlong.c
 lib/get_uid.c
+lib/getdef.c
+lib/getlong.c
+lib/getgr_nam_gid.c
+lib/getrange.c
 lib/groupio.c
 lib/groupmem.c
 lib/gshadow.c
+lib/hushed.c
+lib/idmapping.c
+lib/isexpired.c
+lib/limits.c
+lib/list.c
 lib/lockpw.c
+lib/log.c
+lib/loginprompt.c
+lib/mail.c
+lib/motd.c
+lib/myname.c
 lib/nscd.c
+lib/obscure.c
+lib/pam_pass.c
+lib/pam_pass_non_interactive.c
 lib/port.c
 lib/pwauth.c
+lib/pwd_init.c
+lib/pwd2spwd.c
+lib/pwdcheck.c
 lib/pwio.c
 lib/pwmem.c
+lib/remove_tree.c
+lib/rlogin.c
+lib/root_flag.c
+lib/salt.c
 lib/selinux.c
 lib/semanage.c
+lib/setugid.c
+lib/setupenv.c
 lib/sgetgrent.c
 lib/sgetpwent.c
 lib/sgetspent.c
@@ -26,64 +70,20 @@ lib/sgroupio.c
 lib/shadow.c
 lib/shadowio.c
 lib/shadowmem.c
+lib/shell.c
 lib/spawn.c
+lib/strtoday.c
+lib/sub.c
+lib/sulog.c
 lib/tcbfuncs.c
-libmisc/addgrps.c
-libmisc/age.c
-libmisc/audit_help.c
-libmisc/basename.c
-libmisc/chkname.c
-libmisc/chowndir.c
-libmisc/chowntty.c
-libmisc/cleanup.c
-libmisc/cleanup_group.c
-libmisc/cleanup_user.c
-libmisc/console.c
-libmisc/copydir.c
-libmisc/date_to_str.c
-libmisc/entry.c
-libmisc/env.c
-libmisc/failure.c
-libmisc/find_new_gid.c
-libmisc/find_new_sub_gids.c
-libmisc/find_new_sub_uids.c
-libmisc/find_new_uid.c
-libmisc/getgr_nam_gid.c
-libmisc/getrange.c
-libmisc/hushed.c
-libmisc/idmapping.c
-libmisc/isexpired.c
-libmisc/limits.c
-libmisc/list.c
-libmisc/log.c
-libmisc/loginprompt.c
-libmisc/mail.c
-libmisc/motd.c
-libmisc/myname.c
-libmisc/obscure.c
-libmisc/pam_pass.c
-libmisc/pam_pass_non_interactive.c
-libmisc/pwd2spwd.c
-libmisc/pwdcheck.c
-libmisc/pwd_init.c
-libmisc/remove_tree.c
-libmisc/rlogin.c
-libmisc/root_flag.c
-libmisc/salt.c
-libmisc/setugid.c
-libmisc/setupenv.c
-libmisc/shell.c
-libmisc/strtoday.c
-libmisc/sub.c
-libmisc/sulog.c
-libmisc/ttytype.c
-libmisc/tz.c
-libmisc/ulimit.c
-libmisc/user_busy.c
-libmisc/utmp.c
-libmisc/valid.c
-libmisc/xgetXXbyYY.c
-libmisc/yesno.c
+lib/ttytype.c
+lib/tz.c
+lib/ulimit.c
+lib/user_busy.c
+lib/utmp.c
+lib/valid.c
+lib/xgetXXbyYY.c
+lib/yesno.c
 src/chage.c
 src/chfn.c
 src/chgpasswd.c
index 585a0b7e9abeed66100c8f841c02729b3c77827b..fcfee9d2cce86016cbf4c2268140eae2c0d3d620 100644 (file)
@@ -9,7 +9,6 @@ sgidperms = 2755
 
 AM_CPPFLAGS = \
        -I${top_srcdir}/lib \
-       -I$(top_srcdir)/libmisc \
        -I$(top_srcdir) \
        -DLOCALEDIR=\"$(datadir)/locale\" \
        $(ECONF_CPPFLAGS)
@@ -85,7 +84,6 @@ shadowsgidubins = passwd
 endif
 
 LDADD          = $(INTLLIBS) \
-                $(top_builddir)/libmisc/libmisc.la \
                 $(top_builddir)/lib/libshadow.la \
                 $(LIBTCB)
 
@@ -183,59 +181,49 @@ MISCLIBS = \
 
 getsubids_LDADD = \
        $(top_builddir)/lib/libshadow.la \
-       $(top_builddir)/libmisc/libmisc.la \
        $(top_builddir)/libsubid/libsubid.la \
        $(MISCLIBS) -ldl
 
 getsubids_CPPFLAGS = \
        -I$(top_srcdir)/lib \
-       -I$(top_srcdir)/libmisc \
        -I$(top_srcdir) \
        -I$(top_builddir)/libsubid
 
 get_subid_owners_LDADD = \
        $(top_builddir)/lib/libshadow.la \
-       $(top_builddir)/libmisc/libmisc.la \
        $(top_builddir)/libsubid/libsubid.la \
        $(MISCLIBS) -ldl
 
 get_subid_owners_CPPFLAGS = \
        -I$(top_srcdir)/lib \
-       -I$(top_srcdir)/libmisc \
        -I$(top_srcdir) \
        -I$(top_builddir)/libsubid
 
 new_subid_range_CPPFLAGS = \
        -I$(top_srcdir)/lib \
-       -I$(top_srcdir)/libmisc \
        -I$(top_srcdir) \
        -I$(top_builddir)/libsubid
 
 new_subid_range_LDADD = \
        $(top_builddir)/lib/libshadow.la \
-       $(top_builddir)/libmisc/libmisc.la \
        $(top_builddir)/libsubid/libsubid.la \
        $(MISCLIBS) -ldl
 
 free_subid_range_CPPFLAGS = \
        -I$(top_srcdir)/lib \
-       -I$(top_srcdir)/libmisc \
        -I$(top_srcdir) \
        -I$(top_builddir)/libsubid
 
 free_subid_range_LDADD = \
        $(top_builddir)/lib/libshadow.la \
-       $(top_builddir)/libmisc/libmisc.la \
        $(top_builddir)/libsubid/libsubid.la \
        $(MISCLIBS) -ldl
 
 check_subid_range_CPPFLAGS = \
        -I$(top_srcdir)/lib \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/libmisc
+       -I$(top_srcdir)
 
 check_subid_range_LDADD = \
        $(top_builddir)/lib/libshadow.la \
-       $(top_builddir)/libmisc/libmisc.la \
        $(MISCLIBS) -ldl
 endif
index d8a208572009b6e5f8871e3e3c5e5574b9456645..28445a3003da76561b0e154ec37bebaab8b28d25 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -97,8 +97,8 @@ static pid_t pid_child = 0;
  * External identifiers
  */
 
-extern char **newenvp; /* libmisc/env.c */
-extern size_t newenvc; /* libmisc/env.c */
+extern char **newenvp; /* lib/env.c */
+extern size_t newenvc; /* lib/env.c */
 
 /* local function prototypes */
 
index 9b3d37a6fafaa90135f32027bb2c64502b707819..a2f8df030e2da58cfd3a4ee4e323e4f15836783b 100644 (file)
@@ -82,7 +82,6 @@ prepare_chroot ()
 
        # Copy existing gcda
        mkdir -p tmp/root$build_path/lib
-       mkdir -p tmp/root$build_path/libmisc
        mkdir -p tmp/root$build_path/src
        find "$build_path" -name "*.gcda" | while read f
        do
@@ -113,7 +112,6 @@ clean_chroot ()
                mv "$f" "$g"
        done
        rmdir tmp/root$build_path/lib
-       rmdir tmp/root$build_path/libmisc
        rmdir tmp/root$build_path/src
        rmdir tmp/root$build_path
        rmdir tmp/root/root/build
index 6cd3225f4fa7edd85bc7aaa12844d135b02d3f41..dd5acf7283c7031a3cbeb79feade083bd1c3f4e5 100644 (file)
@@ -2,10 +2,10 @@ all: test_nss libsubid_zzz.so
 
 test_nss: test_nss.c ../../../lib/nss.c
        gcc -c -I../../../lib/ -I../../.. -o test_nss.o test_nss.c
-       gcc -o test_nss test_nss.o ../../../libmisc/.libs/libmisc.a ../../../lib/.libs/libshadow.a -ldl
+       gcc -o test_nss test_nss.o ../../../lib/.libs/libshadow.a -ldl
 
 libsubid_zzz.so: libsubid_zzz.c
-       gcc -c -I../../../lib/ -I../../.. -I../../../libmisc -I../../../libsubid libsubid_zzz.c
+       gcc -c -I../../../lib/ -I../../.. -I../../../libsubid libsubid_zzz.c
        gcc -L../../../libsubid -shared -o libsubid_zzz.so libsubid_zzz.o ../../../lib/.libs/libshadow.a -ldl
 
 clean: