Make shadow_logfd and Prog not extern
Closes #444 Closes #465 Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
+3
-2
@@ -53,6 +53,7 @@
|
||||
#include "pwauth.h"
|
||||
/*@-exitarg@*/
|
||||
#include "exitcodes.h"
|
||||
#include "shadowlog.h"
|
||||
|
||||
#ifdef USE_PAM
|
||||
#include "pam_defs.h"
|
||||
@@ -83,7 +84,6 @@ static pam_handle_t *pamh = NULL;
|
||||
* Global variables
|
||||
*/
|
||||
const char *Prog;
|
||||
FILE *shadow_logfd = NULL;
|
||||
|
||||
static const char *hostname = "";
|
||||
static /*@null@*/ /*@only@*/char *username = NULL;
|
||||
@@ -578,7 +578,8 @@ int main (int argc, char **argv)
|
||||
|
||||
amroot = (getuid () == 0);
|
||||
Prog = Basename (argv[0]);
|
||||
shadow_logfd = stderr;
|
||||
log_set_progname(Prog);
|
||||
log_set_logfd(stderr);
|
||||
|
||||
if (geteuid() != 0) {
|
||||
fprintf (stderr, _("%s: Cannot possibly work without effective root\n"), Prog);
|
||||
|
||||
Reference in New Issue
Block a user