groupio.c \
groupmem.c \
groupio.h \
- gshadow.c \
hushed.c \
idmapping.h \
idmapping.c \
shadow/gshadow/endsgent.h \
shadow/gshadow/fgetsgent.c \
shadow/gshadow/fgetsgent.h \
+ shadow/gshadow/getsgent.c \
+ shadow/gshadow/getsgent.h \
shadow/gshadow/getsgnam.c \
shadow/gshadow/getsgnam.h \
shadow/gshadow/gshadow.c \
+++ /dev/null
-/*
- * SPDX-FileCopyrightText: 1990 - 1994, Julianne Frances Haugh
- * SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz
- * SPDX-FileCopyrightText: 2005 , Tomasz Kłoczko
- * SPDX-FileCopyrightText: 2008 - 2009, Nicolas François
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "config.h"
-
-#if defined(SHADOWGRP) && !__has_include(<gshadow.h>)
-
-#ident "$Id$"
-
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "defines.h"
-#include "prototypes.h"
-#include "shadow/gshadow/fgetsgent.h"
-#include "shadow/gshadow/gshadow.h"
-#include "shadow/gshadow/setsgent.h"
-#include "shadow/gshadow/sgrp.h"
-#include "string/strcmp/streq.h"
-
-
-/*
- * getsgent - get a single shadow group entry
- */
-
-/*@observer@*//*@null@*/struct sgrp *getsgent (void)
-{
- if (NULL == gshadow) {
- setsgent ();
- }
- return fgetsgent(gshadow);
-}
-#else
-extern int ISO_C_forbids_an_empty_translation_unit;
-#endif // !SHADOWGRP
#include <config.h>
-#include "shadow/gshadow/sgrp.h"
-
-
-/*@observer@*//*@null@*/struct sgrp *getsgent (void);
#define GSHADOW "/etc/gshadow"
--- /dev/null
+// SPDX-FileCopyrightText: 1990-1994, Julianne Frances Haugh
+// SPDX-FileCopyrightText: 1996-1998, Marek Michałkiewicz
+// SPDX-FileCopyrightText: 2005, Tomasz Kłoczko
+// SPDX-FileCopyrightText: 2008-2009, Nicolas François
+// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#include "config.h"
+
+#include "shadow/gshadow/getsgent.h"
+
+#include <stddef.h>
+
+#include "shadow/gshadow/fgetsgent.h"
+#include "shadow/gshadow/gshadow.h"
+#include "shadow/gshadow/setsgent.h"
+#include "shadow/gshadow/sgrp.h"
+
+
+#if defined(SHADOWGRP) && !__has_include(<gshadow.h>)
+// get-next shadow group entry
+struct sgrp *
+getsgent(void)
+{
+ if (NULL == gshadow) {
+ setsgent ();
+ }
+ return fgetsgent(gshadow);
+}
+#endif
--- /dev/null
+// SPDX-FileCopyrightText: 1988-1994, Julianne Frances Haugh
+// SPDX-FileCopyrightText: 1996-1997, Marek Michałkiewicz
+// SPDX-FileCopyrightText: 2003-2005, Tomasz Kłoczko
+// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#ifndef SHADOW_INCLUDE_LIB_SHADOW_GSHADOW_GETSGENT_H_
+#define SHADOW_INCLUDE_LIB_SHADOW_GSHADOW_GETSGENT_H_
+
+
+#include "config.h"
+
+#include "shadow/gshadow/sgrp.h"
+
+
+#if __has_include(<gshadow.h>)
+# include <gshadow.h>
+#else
+struct sgrp *getsgent(void);
+#endif
+
+
+#endif // include guard
#include <string.h>
#include "defines.h"
+#include "shadow/gshadow/getsgent.h"
#include "shadow/gshadow/setsgent.h"
#include "shadow/gshadow/sgrp.h"
lib/getrange.c
lib/groupio.c
lib/groupmem.c
-lib/gshadow.c
lib/hushed.c
lib/idmapping.c
lib/isexpired.c