lib/agetpass.h: Move prototypes to dedicated header

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2023-09-04 08:57:18 -05:00
committed by Serge Hallyn
parent 158866bfdc
commit 7c45a6e8ba
8 changed files with 29 additions and 6 deletions
+1
View File
@@ -25,6 +25,7 @@ libshadow_la_SOURCES = \
addgrps.c \
age.c \
agetpass.c \
agetpass.h \
alloc.c \
alloc.h \
audit_help.c \
+2 -1
View File
@@ -7,6 +7,8 @@
#include <config.h>
#include "agetpass.h"
#include <limits.h>
#include <readpassphrase.h>
#include <stdio.h>
@@ -16,7 +18,6 @@
#ident "$Id$"
#include "alloc.h"
#include "prototypes.h"
#if WITH_LIBBSD == 0
#include "freezero.h"
+21
View File
@@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: 2022-2023, Alejandro Colomar <alx@kernel.org>
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SHADOW_INCLUDE_LIB_AGETPASS_H_
#define SHADOW_INCLUDE_LIB_AGETPASS_H_
#include <config.h>
#include "defines.h"
void erase_pass(char *pass);
ATTR_MALLOC(erase_pass)
char *agetpass(const char *prompt);
#endif // include guard
-5
View File
@@ -43,11 +43,6 @@ extern int add_groups (const char *);
extern void agecheck (/*@null@*/const struct spwd *);
extern int expire (const struct passwd *, /*@null@*/const struct spwd *);
/* agetpass.c */
extern void erase_pass(char *pass);
ATTR_MALLOC(erase_pass)
extern char *agetpass(const char *prompt);
/* isexpired.c */
extern int isexpired (const struct passwd *, /*@null@*/const struct spwd *);
+1
View File
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <sys/types.h>
#include "agetpass.h"
#include "alloc.h"
#include "defines.h"
#include "groupio.h"
+1
View File
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <assert.h>
#include "agetpass.h"
#include "alloc.h"
#include "defines.h"
#include "getdef.h"
+1
View File
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <time.h>
#include "agetpass.h"
#include "alloc.h"
#include "defines.h"
#include "getdef.h"
+2
View File
@@ -16,6 +16,8 @@
#include <signal.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include "agetpass.h"
#include "defines.h"
#include "getdef.h"
#include "memzero.h"