[tac_plus] Default user config values

David Clymer david at hrcsb.org
Wed May 20 20:50:46 UTC 2009


I want to authenticate users via PAM & LDAP, but since tac_plus doesn't
allow me to specify PAM as a default authentication method, I modified
config.c to allow users which don't have specific configs, to use a the
authentication method (an any other config values) from the DEFAULT
user. I'm not completely sure this isn't stupid for one reason or
another, but I need that functionality. In any case, here is the simple
change I made:

--- tacacs+-F4.0.4.18/config.c	2009-03-18 19:24:54.000000000 -0400
+++ tacacs+-F4.0.4.18-davidc/config.c	2009-05-20 12:35:34.000000000 -0400
@@ -1854,8 +1854,8 @@
 
     if (!user) {
 	if (debug & DEBUG_CONFIG_FLAG)
-	    report(LOG_DEBUG, "cfg_get_value: no user/group named %s", name);
-	return(value);
+	    report(LOG_DEBUG, "cfg_get_value: no user/group named %s, using DEFAULT values.", name);
+        user = (USER *) hash_lookup(isuser ? usertable : grouptable, DEFAULT_USERNAME);
     }
 
     /* found the entry. Lookup value from attr=value */




Enjoy, and thanks for writing tac_plus!

-davidc

--
Experience is that marvelous thing that enables you to recognize a
mistake when you make it again." -Franklin P. Jones



More information about the tac_plus mailing list