]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Drop unused function subid_init()
authorChristian Göttsche <cgzones@googlemail.com>
Fri, 5 Aug 2022 15:40:39 +0000 (17:40 +0200)
committerSerge Hallyn <serge@hallyn.com>
Sat, 6 Aug 2022 16:27:56 +0000 (11:27 -0500)
libsubid/api.c
libsubid/subid.h.in

index 00da74f62284ca2d99228a639f876734658490d8..0c8c451a82397c9fb7a41cdc9b1e8558e5cbd4e1 100644 (file)
 #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)
 {
index 79744eda1676b707ecdc4cc8e6f67ae36302fba9..c8d9273f4223d4077b2cc4ce35ff4fb41ecfff2e 100644 (file)
@@ -39,22 +39,6 @@ enum subid_status {
 extern "C" {
 #endif
 
-/*
- * subid_init: initialize libsubid
- *
- * @progname: Name to display as program.  If NULL, then "(libsubid)" will be
- *            shown in error messages.
- * @logfd:    Open file pointer to pass error messages to.  If NULL, then
- *            /dev/null will be opened and messages will be sent there.  The
- *            default if libsubid_init() is not called is stderr (2).
- *
- * This function does not need to be called.  If not called, then the defaults
- * will be used.
- *
- * Returns false if an error occurred.
- */
-bool subid_init(const char *progname, FILE *logfd);
-
 /*
  * subid_get_uid_ranges: return a list of UID ranges for a user
  *