diff --git a/src/free_subid_range.c b/src/free_subid_range.c index c3e94d5d..fcce80b4 100644 --- a/src/free_subid_range.c +++ b/src/free_subid_range.c @@ -5,10 +5,9 @@ #include #include "atoi/a2i.h" +#include "string/strerrno.h" #include "subid.h" #include "stdlib.h" -#include "prototypes.h" -#include "shadowlog.h" /* Test program for the subid freeing routine */ @@ -29,8 +28,8 @@ int main(int argc, char *argv[]) struct subordinate_range range; bool group = false; // get subuids by default - log_set_progname(Prog); - log_set_logfd(stderr); + if (!subid_init(Prog, stderr)) + fprintf(stderr, "subid_init: %s\n", strerrno()); while ((c = getopt(argc, argv, "g")) != EOF) { switch(c) { case 'g': group = true; break; diff --git a/src/get_subid_owners.c b/src/get_subid_owners.c index ca6cf99c..65369137 100644 --- a/src/get_subid_owners.c +++ b/src/get_subid_owners.c @@ -6,9 +6,9 @@ #include "atoi/getnum.h" #include "attr.h" #include "prototypes.h" -#include "shadowlog.h" #include "stdlib.h" #include "string/strcmp/streq.h" +#include "string/strerrno.h" #include "subid.h" @@ -24,8 +24,8 @@ int main(int argc, char *argv[]) uid_t u; uid_t *uids; - log_set_progname(Prog); - log_set_logfd(stderr); + if (!subid_init(Prog, stderr)) + fprintf(stderr, "subid_init: %s\n", strerrno()); if (argc < 2) { usage(); } diff --git a/src/getsubids.c b/src/getsubids.c index 9e29879f..386c66d6 100644 --- a/src/getsubids.c +++ b/src/getsubids.c @@ -6,8 +6,8 @@ #include "attr.h" #include "prototypes.h" -#include "shadowlog.h" #include "string/strcmp/streq.h" +#include "string/strerrno.h" #include "subid.h" static const char Prog[] = "getsubids"; @@ -22,8 +22,8 @@ int main(int argc, char *argv[]) struct subid_range *ranges; const char *owner; - log_set_progname(Prog); - log_set_logfd(stderr); + if (!subid_init(Prog, stderr)) + fprintf(stderr, "subid_init: %s\n", strerrno()); if (argc < 2) usage(); owner = argv[1]; diff --git a/src/new_subid_range.c b/src/new_subid_range.c index e423b1ab..bca379d8 100644 --- a/src/new_subid_range.c +++ b/src/new_subid_range.c @@ -4,10 +4,9 @@ #include #include "atoi/a2i.h" +#include "string/strerrno.h" #include "subid.h" #include "stdlib.h" -#include "prototypes.h" -#include "shadowlog.h" /* Test program for the subid creation routine */ @@ -31,8 +30,8 @@ int main(int argc, char *argv[]) bool group = false; // get subuids by default bool ok; - log_set_progname(Prog); - log_set_logfd(stderr); + if (!subid_init(Prog, stderr)) + fprintf(stderr, "subid_init: %s\n", strerrno()); while ((c = getopt(argc, argv, "gn")) != EOF) { switch(c) { case 'n': makenew = true; break;