summaryrefslogtreecommitdiff
path: root/sys-apps/shadow/files/shadow-4.14.0-bug912446.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/shadow/files/shadow-4.14.0-bug912446.patch')
-rw-r--r--sys-apps/shadow/files/shadow-4.14.0-bug912446.patch1305
1 files changed, 1305 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/shadow-4.14.0-bug912446.patch b/sys-apps/shadow/files/shadow-4.14.0-bug912446.patch
new file mode 100644
index 000000000000..881c8f7f4ad4
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.14.0-bug912446.patch
@@ -0,0 +1,1305 @@
+https://bugs.gentoo.org/912446
+
+From c34c2606cf8f0a52113156d9e22b7a35b391a17e Mon Sep 17 00:00:00 2001
+From: Alejandro Colomar <alx@kernel.org>
+Date: Fri, 25 Aug 2023 11:29:00 +0200
+Subject: [PATCH] lib, libmisc: Move source files to lib (where their headers
+ were)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Scripted change:
+
+$ find lib/ -type f \
+| grep '\.h$' \
+| sed 's,lib/,libmisc/,' \
+| sed 's,\.h$,.c,' \
+| xargs find 2>/dev/null \
+| xargs mv -t lib/;
+
+Plus updating the Makefiles.
+
+Closes: <https://github.com/shadow-maint/shadow/issues/791>
+Closes: <https://bugs.gentoo.org/912446>
+Link: <https://github.com/shadow-maint/shadow/issues/763#issuecomment-1664383425>
+Link: <https://github.com/shadow-maint/shadow/pull/776>
+Link: <https://github.com/shadow-maint/shadow/commit/d0518cc250afeaceb772a7f50a900cfc9b3ab937>
+Reported-by: Christian Bricart <christian@bricart.de>
+Reported-by: Robert Marmorstein <robert@marmorstein.org>
+Cc: Sam James <sam@gentoo.org>
+[ jubalh tested the openSUSE package ]
+Tested-by: Michael Vetter <jubalh@iodoru.org>
+Acked-by: Michael Vetter <jubalh@iodoru.org>
+[ Robert F. tested the Gentoo package ]
+Tested-by: Robert Förster <Dessa@gmake.de>
+Cc: David Seifert <soap@gentoo.org>
+Signed-off-by: Alejandro Colomar <alx@kernel.org>
+---
+ lib/Makefile.am | 10 ++++++++++
+ {libmisc => lib}/alloc.c | 0
+ {libmisc => lib}/bit.c | 0
+ {libmisc => lib}/mempcpy.c | 0
+ {libmisc => lib}/stpecpy.c | 0
+ {libmisc => lib}/stpeprintf.c | 0
+ libmisc/Makefile.am | 9 ---------
+ 7 files changed, 10 insertions(+), 9 deletions(-)
+ rename {libmisc => lib}/alloc.c (100%)
+ rename {libmisc => lib}/bit.c (100%)
+ rename {libmisc => lib}/mempcpy.c (100%)
+ rename {libmisc => lib}/stpecpy.c (100%)
+ rename {libmisc => lib}/stpeprintf.c (100%)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index c8d6dd5fb..7f3f7f639 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -14,6 +14,10 @@ libshadow_la_CPPFLAGS += -I$(top_srcdir)
+ libshadow_la_CFLAGS = $(LIBBSD_CFLAGS)
+
+ libshadow_la_SOURCES = \
++ alloc.c \
++ alloc.h \
++ bit.c \
++ bit.h \
+ commonio.c \
+ commonio.h \
+ defines.h \
+@@ -34,6 +38,8 @@ libshadow_la_SOURCES = \
+ groupio.h \
+ gshadow.c \
+ lockpw.c \
++ mempcpy.c \
++ mempcpy.h \
+ nss.c \
+ nscd.c \
+ nscd.h \
+@@ -67,6 +73,10 @@ libshadow_la_SOURCES = \
+ shadowio.h \
+ shadowmem.c \
+ spawn.c \
++ stpecpy.c \
++ stpecpy.h \
++ stpeprintf.c \
++ stpeprintf.h \
+ write_full.c
+
+ if WITH_TCB
+diff --git a/libmisc/alloc.c b/lib/alloc.c
+similarity index 100%
+rename from libmisc/alloc.c
+rename to lib/alloc.c
+diff --git a/libmisc/bit.c b/lib/bit.c
+similarity index 100%
+rename from libmisc/bit.c
+rename to lib/bit.c
+diff --git a/libmisc/mempcpy.c b/lib/mempcpy.c
+similarity index 100%
+rename from libmisc/mempcpy.c
+rename to lib/mempcpy.c
+diff --git a/libmisc/stpecpy.c b/lib/stpecpy.c
+similarity index 100%
+rename from libmisc/stpecpy.c
+rename to lib/stpecpy.c
+diff --git a/libmisc/stpeprintf.c b/lib/stpeprintf.c
+similarity index 100%
+rename from libmisc/stpeprintf.c
+rename to lib/stpeprintf.c
+diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
+index 10bf1537f..5eba4650a 100644
+--- a/libmisc/Makefile.am
++++ b/libmisc/Makefile.am
+@@ -16,12 +16,8 @@ libmisc_la_SOURCES = \
+ addgrps.c \
+ age.c \
+ agetpass.c \
+- alloc.c \
+- ../lib/alloc.h \
+ audit_help.c \
+ basename.c \
+- bit.c \
+- ../lib/bit.h \
+ chkname.c \
+ chkname.h \
+ chowndir.c \
+@@ -53,7 +49,6 @@ libmisc_la_SOURCES = \
+ list.c \
+ loginprompt.c \
+ mail.c \
+- mempcpy.c \
+ motd.c \
+ myname.c \
+ obscure.c \
+@@ -71,10 +66,6 @@ libmisc_la_SOURCES = \
+ setugid.c \
+ setupenv.c \
+ shell.c \
+- stpecpy.c \
+- ../lib/stpecpy.h \
+- stpeprintf.c \
+- ../lib/stpeprintf.h \
+ strtoday.c \
+ sub.c \
+ sulog.c \
+From 093fb605f9ca0df8310210377b12c0cf2ea5110c Mon Sep 17 00:00:00 2001
+From: Alejandro Colomar <alx@kernel.org>
+Date: Mon, 28 Aug 2023 12:54:22 +0200
+Subject: [PATCH] lib: Merge libmisc into libshadow
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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>
+---
+ .gitignore | 2 +-
+ Makefile.am | 2 +-
+ TODO | 4 +-
+ configure.ac | 1 -
+ lib/Makefile.am | 125 ++++++++++++++++++--
+ {libmisc => lib}/addgrps.c | 0
+ {libmisc => lib}/age.c | 0
+ {libmisc => lib}/agetpass.c | 0
+ {libmisc => lib}/audit_help.c | 0
+ {libmisc => lib}/basename.c | 0
+ {libmisc => lib}/btrfs.c | 0
+ {libmisc => lib}/chkname.c | 0
+ {libmisc => lib}/chkname.h | 0
+ {libmisc => lib}/chowndir.c | 0
+ {libmisc => lib}/chowntty.c | 0
+ {libmisc => lib}/cleanup.c | 0
+ {libmisc => lib}/cleanup_group.c | 0
+ {libmisc => lib}/cleanup_user.c | 0
+ {libmisc => lib}/console.c | 0
+ {libmisc => lib}/copydir.c | 0
+ {libmisc => lib}/csrand.c | 0
+ {libmisc => lib}/date_to_str.c | 0
+ {libmisc => lib}/entry.c | 0
+ {libmisc => lib}/env.c | 0
+ {libmisc => lib}/failure.c | 0
+ {libmisc => lib}/failure.h | 0
+ {libmisc => lib}/find_new_gid.c | 0
+ {libmisc => lib}/find_new_sub_gids.c | 0
+ {libmisc => lib}/find_new_sub_uids.c | 0
+ {libmisc => lib}/find_new_uid.c | 0
+ {libmisc => lib}/freezero.c | 0
+ {libmisc => lib}/freezero.h | 0
+ {libmisc => lib}/getdate.h | 0
+ {libmisc => lib}/getdate.y | 0
+ {libmisc => lib}/getgr_nam_gid.c | 0
+ {libmisc => lib}/getrange.c | 0
+ {libmisc => lib}/gettime.c | 0
+ {libmisc => lib}/hushed.c | 0
+ {libmisc => lib}/idmapping.c | 0
+ {libmisc => lib}/idmapping.h | 0
+ {libmisc => lib}/isexpired.c | 0
+ {libmisc => lib}/limits.c | 0
+ {libmisc => lib}/list.c | 0
+ {libmisc => lib}/log.c | 0
+ {libmisc => lib}/logind.c | 0
+ {libmisc => lib}/loginprompt.c | 0
+ {libmisc => lib}/mail.c | 0
+ {libmisc => lib}/motd.c | 0
+ {libmisc => lib}/myname.c | 0
+ {libmisc => lib}/obscure.c | 0
+ {libmisc => lib}/pam_pass.c | 0
+ {libmisc => lib}/pam_pass_non_interactive.c | 0
+ {libmisc => lib}/prefix_flag.c | 0
+ lib/prototypes.h | 2 +-
+ {libmisc => lib}/pwd2spwd.c | 0
+ {libmisc => lib}/pwd_init.c | 0
+ {libmisc => lib}/pwdcheck.c | 0
+ {libmisc => lib}/readpassphrase.c | 0
+ {libmisc => lib}/readpassphrase.h | 0
+ {libmisc => lib}/remove_tree.c | 0
+ {libmisc => lib}/rlogin.c | 0
+ {libmisc => lib}/root_flag.c | 0
+ {libmisc => lib}/salt.c | 0
+ {libmisc => lib}/setugid.c | 0
+ {libmisc => lib}/setupenv.c | 0
+ {libmisc => lib}/shell.c | 0
+ {libmisc => lib}/strtoday.c | 0
+ {libmisc => lib}/sub.c | 0
+ {libmisc => lib}/sulog.c | 0
+ {libmisc => lib}/ttytype.c | 0
+ {libmisc => lib}/tz.c | 0
+ {libmisc => lib}/ulimit.c | 0
+ {libmisc => lib}/user_busy.c | 0
+ {libmisc => lib}/utmp.c | 0
+ {libmisc => lib}/valid.c | 0
+ {libmisc => lib}/xgetXXbyYY.c | 0
+ {libmisc => lib}/xgetgrgid.c | 0
+ {libmisc => lib}/xgetgrnam.c | 0
+ {libmisc => lib}/xgetpwnam.c | 0
+ {libmisc => lib}/xgetpwuid.c | 0
+ {libmisc => lib}/xgetspnam.c | 0
+ {libmisc => lib}/xprefix_getpwnam.c | 0
+ {libmisc => lib}/yesno.c | 0
+ libmisc/.indent.pro | 5 -
+ libmisc/Makefile.am | 105 ----------------
+ libsubid/Makefile.am | 2 -
+ po/POTFILES.in | 116 +++++++++---------
+ src/Makefile.am | 14 +--
+ src/su.c | 4 +-
+ tests/common/config.sh | 2 -
+ tests/libsubid/04_nss/Makefile | 4 +-
+ 91 files changed, 180 insertions(+), 208 deletions(-)
+ rename {libmisc => lib}/addgrps.c (100%)
+ rename {libmisc => lib}/age.c (100%)
+ rename {libmisc => lib}/agetpass.c (100%)
+ rename {libmisc => lib}/audit_help.c (100%)
+ rename {libmisc => lib}/basename.c (100%)
+ rename {libmisc => lib}/btrfs.c (100%)
+ rename {libmisc => lib}/chkname.c (100%)
+ rename {libmisc => lib}/chkname.h (100%)
+ rename {libmisc => lib}/chowndir.c (100%)
+ rename {libmisc => lib}/chowntty.c (100%)
+ rename {libmisc => lib}/cleanup.c (100%)
+ rename {libmisc => lib}/cleanup_group.c (100%)
+ rename {libmisc => lib}/cleanup_user.c (100%)
+ rename {libmisc => lib}/console.c (100%)
+ rename {libmisc => lib}/copydir.c (100%)
+ rename {libmisc => lib}/csrand.c (100%)
+ rename {libmisc => lib}/date_to_str.c (100%)
+ rename {libmisc => lib}/entry.c (100%)
+ rename {libmisc => lib}/env.c (100%)
+ rename {libmisc => lib}/failure.c (100%)
+ rename {libmisc => lib}/failure.h (100%)
+ rename {libmisc => lib}/find_new_gid.c (100%)
+ rename {libmisc => lib}/find_new_sub_gids.c (100%)
+ rename {libmisc => lib}/find_new_sub_uids.c (100%)
+ rename {libmisc => lib}/find_new_uid.c (100%)
+ rename {libmisc => lib}/freezero.c (100%)
+ rename {libmisc => lib}/freezero.h (100%)
+ rename {libmisc => lib}/getdate.h (100%)
+ rename {libmisc => lib}/getdate.y (100%)
+ rename {libmisc => lib}/getgr_nam_gid.c (100%)
+ rename {libmisc => lib}/getrange.c (100%)
+ rename {libmisc => lib}/gettime.c (100%)
+ rename {libmisc => lib}/hushed.c (100%)
+ rename {libmisc => lib}/idmapping.c (100%)
+ rename {libmisc => lib}/idmapping.h (100%)
+ rename {libmisc => lib}/isexpired.c (100%)
+ rename {libmisc => lib}/limits.c (100%)
+ rename {libmisc => lib}/list.c (100%)
+ rename {libmisc => lib}/log.c (100%)
+ rename {libmisc => lib}/logind.c (100%)
+ rename {libmisc => lib}/loginprompt.c (100%)
+ rename {libmisc => lib}/mail.c (100%)
+ rename {libmisc => lib}/motd.c (100%)
+ rename {libmisc => lib}/myname.c (100%)
+ rename {libmisc => lib}/obscure.c (100%)
+ rename {libmisc => lib}/pam_pass.c (100%)
+ rename {libmisc => lib}/pam_pass_non_interactive.c (100%)
+ rename {libmisc => lib}/prefix_flag.c (100%)
+ rename {libmisc => lib}/pwd2spwd.c (100%)
+ rename {libmisc => lib}/pwd_init.c (100%)
+ rename {libmisc => lib}/pwdcheck.c (100%)
+ rename {libmisc => lib}/readpassphrase.c (100%)
+ rename {libmisc => lib}/readpassphrase.h (100%)
+ rename {libmisc => lib}/remove_tree.c (100%)
+ rename {libmisc => lib}/rlogin.c (100%)
+ rename {libmisc => lib}/root_flag.c (100%)
+ rename {libmisc => lib}/salt.c (100%)
+ rename {libmisc => lib}/setugid.c (100%)
+ rename {libmisc => lib}/setupenv.c (100%)
+ rename {libmisc => lib}/shell.c (100%)
+ rename {libmisc => lib}/strtoday.c (100%)
+ rename {libmisc => lib}/sub.c (100%)
+ rename {libmisc => lib}/sulog.c (100%)
+ rename {libmisc => lib}/ttytype.c (100%)
+ rename {libmisc => lib}/tz.c (100%)
+ rename {libmisc => lib}/ulimit.c (100%)
+ rename {libmisc => lib}/user_busy.c (100%)
+ rename {libmisc => lib}/utmp.c (100%)
+ rename {libmisc => lib}/valid.c (100%)
+ rename {libmisc => lib}/xgetXXbyYY.c (100%)
+ rename {libmisc => lib}/xgetgrgid.c (100%)
+ rename {libmisc => lib}/xgetgrnam.c (100%)
+ rename {libmisc => lib}/xgetpwnam.c (100%)
+ rename {libmisc => lib}/xgetpwuid.c (100%)
+ rename {libmisc => lib}/xgetspnam.c (100%)
+ rename {libmisc => lib}/xprefix_getpwnam.c (100%)
+ rename {libmisc => lib}/yesno.c (100%)
+ delete mode 100644 libmisc/.indent.pro
+ delete mode 100644 libmisc/Makefile.am
+
+diff --git a/Makefile.am b/Makefile.am
+index 630e2aa9c..d8dfc3bf7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -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 8783ccd13..62571f5fd 100644
+--- a/TODO
++++ b/TODO
+@@ -10,13 +10,13 @@
+
+ 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)
+
+
+diff --git a/configure.ac b/configure.ac
+index f4fadc52b..b3bbf57d8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -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
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 7f3f7f639..ca73313dc 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -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
+diff --git a/libmisc/addgrps.c b/lib/addgrps.c
+similarity index 100%
+rename from libmisc/addgrps.c
+rename to lib/addgrps.c
+diff --git a/libmisc/age.c b/lib/age.c
+similarity index 100%
+rename from libmisc/age.c
+rename to lib/age.c
+diff --git a/libmisc/agetpass.c b/lib/agetpass.c
+similarity index 100%
+rename from libmisc/agetpass.c
+rename to lib/agetpass.c
+diff --git a/libmisc/audit_help.c b/lib/audit_help.c
+similarity index 100%
+rename from libmisc/audit_help.c
+rename to lib/audit_help.c
+diff --git a/libmisc/basename.c b/lib/basename.c
+similarity index 100%
+rename from libmisc/basename.c
+rename to lib/basename.c
+diff --git a/libmisc/btrfs.c b/lib/btrfs.c
+similarity index 100%
+rename from libmisc/btrfs.c
+rename to lib/btrfs.c
+diff --git a/libmisc/chkname.c b/lib/chkname.c
+similarity index 100%
+rename from libmisc/chkname.c
+rename to lib/chkname.c
+diff --git a/libmisc/chkname.h b/lib/chkname.h
+similarity index 100%
+rename from libmisc/chkname.h
+rename to lib/chkname.h
+diff --git a/libmisc/chowndir.c b/lib/chowndir.c
+similarity index 100%
+rename from libmisc/chowndir.c
+rename to lib/chowndir.c
+diff --git a/libmisc/chowntty.c b/lib/chowntty.c
+similarity index 100%
+rename from libmisc/chowntty.c
+rename to lib/chowntty.c
+diff --git a/libmisc/cleanup.c b/lib/cleanup.c
+similarity index 100%
+rename from libmisc/cleanup.c
+rename to lib/cleanup.c
+diff --git a/libmisc/cleanup_group.c b/lib/cleanup_group.c
+similarity index 100%
+rename from libmisc/cleanup_group.c
+rename to lib/cleanup_group.c
+diff --git a/libmisc/cleanup_user.c b/lib/cleanup_user.c
+similarity index 100%
+rename from libmisc/cleanup_user.c
+rename to lib/cleanup_user.c
+diff --git a/libmisc/console.c b/lib/console.c
+similarity index 100%
+rename from libmisc/console.c
+rename to lib/console.c
+diff --git a/libmisc/copydir.c b/lib/copydir.c
+similarity index 100%
+rename from libmisc/copydir.c
+rename to lib/copydir.c
+diff --git a/libmisc/csrand.c b/lib/csrand.c
+similarity index 100%
+rename from libmisc/csrand.c
+rename to lib/csrand.c
+diff --git a/libmisc/date_to_str.c b/lib/date_to_str.c
+similarity index 100%
+rename from libmisc/date_to_str.c
+rename to lib/date_to_str.c
+diff --git a/libmisc/entry.c b/lib/entry.c
+similarity index 100%
+rename from libmisc/entry.c
+rename to lib/entry.c
+diff --git a/libmisc/env.c b/lib/env.c
+similarity index 100%
+rename from libmisc/env.c
+rename to lib/env.c
+diff --git a/libmisc/failure.c b/lib/failure.c
+similarity index 100%
+rename from libmisc/failure.c
+rename to lib/failure.c
+diff --git a/libmisc/failure.h b/lib/failure.h
+similarity index 100%
+rename from libmisc/failure.h
+rename to lib/failure.h
+diff --git a/libmisc/find_new_gid.c b/lib/find_new_gid.c
+similarity index 100%
+rename from libmisc/find_new_gid.c
+rename to lib/find_new_gid.c
+diff --git a/libmisc/find_new_sub_gids.c b/lib/find_new_sub_gids.c
+similarity index 100%
+rename from libmisc/find_new_sub_gids.c
+rename to lib/find_new_sub_gids.c
+diff --git a/libmisc/find_new_sub_uids.c b/lib/find_new_sub_uids.c
+similarity index 100%
+rename from libmisc/find_new_sub_uids.c
+rename to lib/find_new_sub_uids.c
+diff --git a/libmisc/find_new_uid.c b/lib/find_new_uid.c
+similarity index 100%
+rename from libmisc/find_new_uid.c
+rename to lib/find_new_uid.c
+diff --git a/libmisc/freezero.c b/lib/freezero.c
+similarity index 100%
+rename from libmisc/freezero.c
+rename to lib/freezero.c
+diff --git a/libmisc/freezero.h b/lib/freezero.h
+similarity index 100%
+rename from libmisc/freezero.h
+rename to lib/freezero.h
+diff --git a/libmisc/getdate.h b/lib/getdate.h
+similarity index 100%
+rename from libmisc/getdate.h
+rename to lib/getdate.h
+diff --git a/libmisc/getdate.y b/lib/getdate.y
+similarity index 100%
+rename from libmisc/getdate.y
+rename to lib/getdate.y
+diff --git a/libmisc/getgr_nam_gid.c b/lib/getgr_nam_gid.c
+similarity index 100%
+rename from libmisc/getgr_nam_gid.c
+rename to lib/getgr_nam_gid.c
+diff --git a/libmisc/getrange.c b/lib/getrange.c
+similarity index 100%
+rename from libmisc/getrange.c
+rename to lib/getrange.c
+diff --git a/libmisc/gettime.c b/lib/gettime.c
+similarity index 100%
+rename from libmisc/gettime.c
+rename to lib/gettime.c
+diff --git a/libmisc/hushed.c b/lib/hushed.c
+similarity index 100%
+rename from libmisc/hushed.c
+rename to lib/hushed.c
+diff --git a/libmisc/idmapping.c b/lib/idmapping.c
+similarity index 100%
+rename from libmisc/idmapping.c
+rename to lib/idmapping.c
+diff --git a/libmisc/idmapping.h b/lib/idmapping.h
+similarity index 100%
+rename from libmisc/idmapping.h
+rename to lib/idmapping.h
+diff --git a/libmisc/isexpired.c b/lib/isexpired.c
+similarity index 100%
+rename from libmisc/isexpired.c
+rename to lib/isexpired.c
+diff --git a/libmisc/limits.c b/lib/limits.c
+similarity index 100%
+rename from libmisc/limits.c
+rename to lib/limits.c
+diff --git a/libmisc/list.c b/lib/list.c
+similarity index 100%
+rename from libmisc/list.c
+rename to lib/list.c
+diff --git a/libmisc/log.c b/lib/log.c
+similarity index 100%
+rename from libmisc/log.c
+rename to lib/log.c
+diff --git a/libmisc/logind.c b/lib/logind.c
+similarity index 100%
+rename from libmisc/logind.c
+rename to lib/logind.c
+diff --git a/libmisc/loginprompt.c b/lib/loginprompt.c
+similarity index 100%
+rename from libmisc/loginprompt.c
+rename to lib/loginprompt.c
+diff --git a/libmisc/mail.c b/lib/mail.c
+similarity index 100%
+rename from libmisc/mail.c
+rename to lib/mail.c
+diff --git a/libmisc/motd.c b/lib/motd.c
+similarity index 100%
+rename from libmisc/motd.c
+rename to lib/motd.c
+diff --git a/libmisc/myname.c b/lib/myname.c
+similarity index 100%
+rename from libmisc/myname.c
+rename to lib/myname.c
+diff --git a/libmisc/obscure.c b/lib/obscure.c
+similarity index 100%
+rename from libmisc/obscure.c
+rename to lib/obscure.c
+diff --git a/libmisc/pam_pass.c b/lib/pam_pass.c
+similarity index 100%
+rename from libmisc/pam_pass.c
+rename to lib/pam_pass.c
+diff --git a/libmisc/pam_pass_non_interactive.c b/lib/pam_pass_non_interactive.c
+similarity index 100%
+rename from libmisc/pam_pass_non_interactive.c
+rename to lib/pam_pass_non_interactive.c
+diff --git a/libmisc/prefix_flag.c b/lib/prefix_flag.c
+similarity index 100%
+rename from libmisc/prefix_flag.c
+rename to lib/prefix_flag.c
+diff --git a/lib/prototypes.h b/lib/prototypes.h
+index 47ed2ca1c..25ee3a093 100644
+--- a/lib/prototypes.h
++++ b/lib/prototypes.h
+@@ -10,7 +10,7 @@
+ /*
+ * prototypes.h
+ *
+- * prototypes of libmisc functions, and private lib functions.
++ * prototypes of some lib functions, and private lib functions.
+ *
+ * $Id$
+ *
+diff --git a/libmisc/pwd2spwd.c b/lib/pwd2spwd.c
+similarity index 100%
+rename from libmisc/pwd2spwd.c
+rename to lib/pwd2spwd.c
+diff --git a/libmisc/pwd_init.c b/lib/pwd_init.c
+similarity index 100%
+rename from libmisc/pwd_init.c
+rename to lib/pwd_init.c
+diff --git a/libmisc/pwdcheck.c b/lib/pwdcheck.c
+similarity index 100%
+rename from libmisc/pwdcheck.c
+rename to lib/pwdcheck.c
+diff --git a/libmisc/readpassphrase.c b/lib/readpassphrase.c
+similarity index 100%
+rename from libmisc/readpassphrase.c
+rename to lib/readpassphrase.c
+diff --git a/libmisc/readpassphrase.h b/lib/readpassphrase.h
+similarity index 100%
+rename from libmisc/readpassphrase.h
+rename to lib/readpassphrase.h
+diff --git a/libmisc/remove_tree.c b/lib/remove_tree.c
+similarity index 100%
+rename from libmisc/remove_tree.c
+rename to lib/remove_tree.c
+diff --git a/libmisc/rlogin.c b/lib/rlogin.c
+similarity index 100%
+rename from libmisc/rlogin.c
+rename to lib/rlogin.c
+diff --git a/libmisc/root_flag.c b/lib/root_flag.c
+similarity index 100%
+rename from libmisc/root_flag.c
+rename to lib/root_flag.c
+diff --git a/libmisc/salt.c b/lib/salt.c
+similarity index 100%
+rename from libmisc/salt.c
+rename to lib/salt.c
+diff --git a/libmisc/setugid.c b/lib/setugid.c
+similarity index 100%
+rename from libmisc/setugid.c
+rename to lib/setugid.c
+diff --git a/libmisc/setupenv.c b/lib/setupenv.c
+similarity index 100%
+rename from libmisc/setupenv.c
+rename to lib/setupenv.c
+diff --git a/libmisc/shell.c b/lib/shell.c
+similarity index 100%
+rename from libmisc/shell.c
+rename to lib/shell.c
+diff --git a/libmisc/strtoday.c b/lib/strtoday.c
+similarity index 100%
+rename from libmisc/strtoday.c
+rename to lib/strtoday.c
+diff --git a/libmisc/sub.c b/lib/sub.c
+similarity index 100%
+rename from libmisc/sub.c
+rename to lib/sub.c
+diff --git a/libmisc/sulog.c b/lib/sulog.c
+similarity index 100%
+rename from libmisc/sulog.c
+rename to lib/sulog.c
+diff --git a/libmisc/ttytype.c b/lib/ttytype.c
+similarity index 100%
+rename from libmisc/ttytype.c
+rename to lib/ttytype.c
+diff --git a/libmisc/tz.c b/lib/tz.c
+similarity index 100%
+rename from libmisc/tz.c
+rename to lib/tz.c
+diff --git a/libmisc/ulimit.c b/lib/ulimit.c
+similarity index 100%
+rename from libmisc/ulimit.c
+rename to lib/ulimit.c
+diff --git a/libmisc/user_busy.c b/lib/user_busy.c
+similarity index 100%
+rename from libmisc/user_busy.c
+rename to lib/user_busy.c
+diff --git a/libmisc/utmp.c b/lib/utmp.c
+similarity index 100%
+rename from libmisc/utmp.c
+rename to lib/utmp.c
+diff --git a/libmisc/valid.c b/lib/valid.c
+similarity index 100%
+rename from libmisc/valid.c
+rename to lib/valid.c
+diff --git a/libmisc/xgetXXbyYY.c b/lib/xgetXXbyYY.c
+similarity index 100%
+rename from libmisc/xgetXXbyYY.c
+rename to lib/xgetXXbyYY.c
+diff --git a/libmisc/xgetgrgid.c b/lib/xgetgrgid.c
+similarity index 100%
+rename from libmisc/xgetgrgid.c
+rename to lib/xgetgrgid.c
+diff --git a/libmisc/xgetgrnam.c b/lib/xgetgrnam.c
+similarity index 100%
+rename from libmisc/xgetgrnam.c
+rename to lib/xgetgrnam.c
+diff --git a/libmisc/xgetpwnam.c b/lib/xgetpwnam.c
+similarity index 100%
+rename from libmisc/xgetpwnam.c
+rename to lib/xgetpwnam.c
+diff --git a/libmisc/xgetpwuid.c b/lib/xgetpwuid.c
+similarity index 100%
+rename from libmisc/xgetpwuid.c
+rename to lib/xgetpwuid.c
+diff --git a/libmisc/xgetspnam.c b/lib/xgetspnam.c
+similarity index 100%
+rename from libmisc/xgetspnam.c
+rename to lib/xgetspnam.c
+diff --git a/libmisc/xprefix_getpwnam.c b/lib/xprefix_getpwnam.c
+similarity index 100%
+rename from libmisc/xprefix_getpwnam.c
+rename to lib/xprefix_getpwnam.c
+diff --git a/libmisc/yesno.c b/lib/yesno.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
+index fe572bb76..000000000
+--- a/libmisc/.indent.pro
++++ /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
+index 5eba4650a..000000000
+--- a/libmisc/Makefile.am
++++ /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
+diff --git a/libsubid/Makefile.am b/libsubid/Makefile.am
+index 09ec3416d..5ba0ab357 100644
+--- a/libsubid/Makefile.am
++++ b/libsubid/Makefile.am
+@@ -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\"
+diff --git a/po/POTFILES.in b/po/POTFILES.in
+index 0b318a5fe..d6c877519 100644
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -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
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 585a0b7e9..fcfee9d2c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -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
+diff --git a/src/su.c b/src/su.c
+index d8a208572..28445a300 100644
+--- 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 */
+