Revert "Drop unused function subid_init()"
As rbalint points out, this was an exported fn. It also is
the only way for a libsubid user to do what it does, so let's
not drop it.
This reverts commit 477c8e6f42
.
This commit is contained in:
@ -17,6 +17,31 @@
|
||||
#include "subid.h"
|
||||
#include "shadowlog.h"
|
||||
|
||||
bool subid_init(const char *progname, FILE * logfd)
|
||||
{
|
||||
FILE *shadow_logfd;
|
||||
if (progname) {
|
||||
progname = strdup(progname);
|
||||
if (!progname)
|
||||
return false;
|
||||
log_set_progname(progname);
|
||||
} else {
|
||||
log_set_progname("(libsubid)");
|
||||
}
|
||||
|
||||
if (logfd) {
|
||||
log_set_logfd(logfd);
|
||||
return true;
|
||||
}
|
||||
shadow_logfd = fopen("/dev/null", "w");
|
||||
if (!shadow_logfd) {
|
||||
log_set_logfd(stderr);
|
||||
return false;
|
||||
}
|
||||
log_set_logfd(shadow_logfd);
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
int get_subid_ranges(const char *owner, enum subid_type id_type, struct subid_range **ranges)
|
||||
{
|
||||
|
Reference in New Issue
Block a user