Skip to content

Commit 79157cb

Browse files
committed
Make shadow_logfd and Prog not extern
Closes #444 Closes #465 Signed-off-by: Serge Hallyn <[email protected]>
1 parent b8c67c3 commit 79157cb

79 files changed

Lines changed: 371 additions & 217 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎lib/Makefile.am‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ libshadow_la_SOURCES = \
3636
nss.c \
3737
nscd.c \
3838
nscd.h \
39+
shadowlog.c \
40+
shadowlog.h \
3941
sssd.c \
4042
sssd.h \
4143
pam_defs.h \

‎lib/commonio.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#endif /* WITH_TCB */
5252
#include "prototypes.h"
5353
#include "commonio.h"
54+
#include "shadowlog_internal.h"
5455

5556
/* local function prototypes */
5657
static int lrename (const char *, const char *);

‎lib/encrypt.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
#include "prototypes.h"
4141
#include "defines.h"
42+
#include "shadowlog_internal.h"
4243

4344
/*@exposed@*//*@null@*/char *pw_encrypt (const char *clear, const char *salt)
4445
{

‎lib/getdef.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <libeconf.h>
4545
#endif
4646
#include "getdef.h"
47+
#include "shadowlog_internal.h"
4748
/*
4849
* A configuration item definition.
4950
*/

‎lib/nscd.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "defines.h"
1111
#include "prototypes.h"
1212
#include "nscd.h"
13+
#include "shadowlog_internal.h"
1314

1415
#define MSG_NSCD_FLUSH_CACHE_FAILED "%s: Failed to flush the nscd cache.\n"
1516

‎lib/nss.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <stdatomic.h>
99
#include "prototypes.h"
1010
#include "../libsubid/subid.h"
11+
#include "shadowlog_internal.h"
1112

1213
#define NSSWITCH "/etc/nsswitch.conf"
1314

‎lib/prototypes.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@
5959
#include "defines.h"
6060
#include "commonio.h"
6161

62-
extern /*@observer@*/ const char *Prog; /* Program name showed in error messages */
63-
extern FILE *shadow_logfd; /* file descripter to which error messages are printed */
64-
6562
/* addgrps.c */
6663
#if defined (HAVE_SETGROUPS) && ! defined (USE_PAM)
6764
extern int add_groups (const char *);

‎lib/run_part.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <sys/wait.h>
99
#include <unistd.h>
1010
#include <lib/prototypes.h>
11+
#include "shadowlog_internal.h"
1112

1213
int run_part (char *script_path, char *name, char *action)
1314
{

‎lib/selinux.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#include <selinux/label.h>
3939
#include "prototypes.h"
4040

41+
#include "shadowlog_internal.h"
42+
4143
static bool selinux_checked = false;
4244
static bool selinux_enabled;
4345
static /*@null@*/struct selabel_handle *selabel_hnd = NULL;

‎lib/semanage.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <semanage/semanage.h>
4444
#include "prototypes.h"
4545

46+
#include "shadowlog_internal.h"
4647

4748
#ifndef DEFAULT_SERANGE
4849
#define DEFAULT_SERANGE "s0"

0 commit comments

Comments
 (0)