Skip to content

Commit

Permalink
configure.ac, lib/, src/: Presume working shadow group support in libc
Browse files Browse the repository at this point in the history
This check was testing a specific bug in a prehistoric libc version.
Red Hat 3 is long dead, and it doesn't make sense to test for that
specific bug.

Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar committed Nov 6, 2024
1 parent 86451e3 commit 7abca5a
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 379 deletions.
27 changes: 0 additions & 27 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -76,33 +76,6 @@ AC_CHECK_FUNC(secure_getenv, [AC_DEFINE(HAS_SECURE_GETENV,
1,
[Defined to 1 if you have the declaration of 'secure_getenv'])])

if test "$ac_cv_header_shadow_h" = "yes"; then
AC_CACHE_CHECK(for working shadow group support,
ac_cv_libc_shadowgrp,
AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <shadow.h>
#ifdef HAVE_GSHADOW_H
#include <gshadow.h>
#endif
int
main()
{
struct sgrp *sg = sgetsgent("test:x::");
/* NYS libc on Red Hat 3.0.3 has broken shadow group support */
return !sg || !sg->sg_adm || !sg->sg_mem;
}]
)],
[ac_cv_libc_shadowgrp=yes],
[ac_cv_libc_shadowgrp=no],
[ac_cv_libc_shadowgrp=no]
)
)

if test "$ac_cv_libc_shadowgrp" = "yes"; then
AC_DEFINE(HAVE_SHADOWGRP, 1, [Have working shadow group support in libc])
fi
fi

AC_CACHE_CHECK([location of shared mail directory], shadow_cv_maildir,
[for shadow_cv_maildir in /var/mail /var/spool/mail /usr/spool/mail /usr/mail none; do
if test -d $shadow_cv_maildir; then
Expand Down
2 changes: 0 additions & 2 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ libshadow_la_SOURCES = \
groupio.c \
groupmem.c \
groupio.h \
gshadow.c \
hushed.c \
idmapping.h \
idmapping.c \
Expand Down Expand Up @@ -263,5 +262,4 @@ endif

EXTRA_DIST = \
.indent.pro \
gshadow_.h \
xgetXXbyYY.c
1 change: 1 addition & 0 deletions lib/age.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <errno.h>
#include <pwd.h>
#include <grp.h>
#include <gshadow.h>

#include "adds.h"
#include "defines.h"
Expand Down
8 changes: 0 additions & 8 deletions lib/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,7 @@

#include <dirent.h>

/*
* Possible cases:
* - /usr/include/shadow.h exists and includes the shadow group stuff.
* - /usr/include/shadow.h exists, but we use our own gshadow.h.
*/
#include <shadow.h>
#if defined(SHADOWGRP) && !defined(GSHADOW)
#include "gshadow_.h"
#endif

#include <limits.h>

Expand Down
289 changes: 0 additions & 289 deletions lib/gshadow.c

This file was deleted.

Loading

0 comments on commit 7abca5a

Please sign in to comment.