File: shadowlog.c

package info (click to toggle)
shadow 1%3A4.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 66,920 kB
  • sloc: sh: 44,121; ansic: 34,155; xml: 12,285; exp: 3,691; makefile: 1,650; python: 1,135; perl: 120; sed: 16
file content (31 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "shadowlog.h"

#include "lib/shadowlog_internal.h"

const char *shadow_progname = "libshadow";
FILE *shadow_logfd = NULL;

void log_set_progname(const char *progname)
{
	shadow_progname = progname;
}

const char *log_get_progname(void)
{
	return shadow_progname;
}

void log_set_logfd(FILE *fd)
{
	if (NULL != fd)
		shadow_logfd = fd;
	else
		shadow_logfd = stderr;
}

FILE *log_get_logfd(void)
{
	if (shadow_logfd != NULL)
		return shadow_logfd;
	return stderr;
}