summaryrefslogtreecommitdiff
path: root/usr/src/lib/libidmap/common/idmap_api.c
diff options
context:
space:
mode:
authorJulian Pullen <Julian.Pullen@Sun.COM>2009-02-02 09:20:33 +0000
committerJulian Pullen <Julian.Pullen@Sun.COM>2009-02-02 09:20:33 +0000
commit7a8a68f5e3efbaec1a375c2d50bd20b566631755 (patch)
tree5d44133126f3644a272adbf626417476952f2b0b /usr/src/lib/libidmap/common/idmap_api.c
parent7f667e74610492ddbce8ce60f52ece95d2401949 (diff)
downloadillumos-gate-7a8a68f5e3efbaec1a375c2d50bd20b566631755.tar.gz
6719899 ad_disc_* could be more like a library still
6785572 Move AD auto discovery module to libadutils and remove duplicate code --HG-- rename : usr/src/lib/libidmap/common/addisc.c => usr/src/lib/libadutils/common/addisc.c rename : usr/src/lib/libidmap/common/addisc.h => usr/src/lib/libadutils/common/addisc.h
Diffstat (limited to 'usr/src/lib/libidmap/common/idmap_api.c')
-rw-r--r--usr/src/lib/libidmap/common/idmap_api.c62
1 files changed, 1 insertions, 61 deletions
diff --git a/usr/src/lib/libidmap/common/idmap_api.c b/usr/src/lib/libidmap/common/idmap_api.c
index 0fe0d8f418..a4a0b274ff 100644
--- a/usr/src/lib/libidmap/common/idmap_api.c
+++ b/usr/src/lib/libidmap/common/idmap_api.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -45,24 +45,6 @@
/*LINTLIBRARY*/
-/*
- * The following structure determines where the log messages from idmapdlog()
- * go to. It can be stderr (idmap, idmapd -d) and/or syslog (idmapd).
- *
- * logstate.max_pri is integer cutoff necessary to silence low-priority
- * messages to stderr. Syslog has its own means so there a boolean
- * logstate.write_syslog is enough.
- *
- * logstate.degraded is a mode used by idmapd in its degraded state.
- */
-
-static struct {
- bool_t write_syslog;
- int max_pri; /* Max priority written to stderr */
- bool_t degraded;
-} logstate = {FALSE, LOG_DEBUG, FALSE};
-
-
static struct timeval TIMEOUT = { 25, 0 };
static int idmap_stat2errno(idmap_stat);
@@ -2566,45 +2548,3 @@ idmap_getwinnamebygid(gid_t gid, int flag, char **name, char **domain)
{
return (idmap_getwinnamebypid(gid, 0, flag, name, domain));
}
-
-
-/* printflike */
-void
-idmapdlog(int pri, const char *format, ...) {
- va_list args;
-
- va_start(args, format);
- if (pri <= logstate.max_pri) {
- (void) vfprintf(stderr, format, args);
- (void) fprintf(stderr, "\n");
- }
-
- /*
- * We don't want to fill up the logs with useless messages when
- * we're degraded, but we still want to log.
- */
- if (logstate.degraded)
- pri = LOG_DEBUG;
-
- if (logstate.write_syslog)
- (void) vsyslog(pri, format, args);
- va_end(args);
-}
-
-void
-idmap_log_stderr(int pri)
-{
- logstate.max_pri = pri;
-}
-
-void
-idmap_log_syslog(bool_t what)
-{
- logstate.write_syslog = what;
-}
-
-void
-idmap_log_degraded(bool_t what)
-{
- logstate.degraded = what;
-}