[Fedora-directory-commits] adminserver/admserv/cgi-src40 config.c, 1.7, 1.8 snmpconf.c, 1.7, NONE snmpconf.properties, 1.3, NONE snmpmctl.c, 1.7, NONE snmpmctl.properties, 1.3, NONE

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Fri May 11 17:26:14 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/adminserver/admserv/cgi-src40
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2777/cgi-src40

Modified Files:
	config.c 
Removed Files:
	snmpconf.c snmpconf.properties snmpmctl.c snmpmctl.properties 
Log Message:
rename scripts to x-ds-admin; fix uid change in config.c; remove obsolete snmp CGIs


Index: config.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- config.c	9 May 2007 00:26:30 -0000	1.7
+++ config.c	11 May 2007 17:26:12 -0000	1.8
@@ -791,13 +791,16 @@
 */
 #ifdef XP_UNIX
 static int  change_server_uid(PsetHndl pset, char* newuname) {
-  char *sroot = getenv("NETSITE_ROOT");
   int errorCode;
   int newuid;
   char *olduname = psetGetAttrSingleValue(pset, 
 					  "configuration.nsSuiteSpotUser", 
 					  &errorCode);
 
+  char *pidfile = psetGetAttrSingleValue(pset, 
+					 "configuration.nsPidLog", 
+					 &errorCode);
+
   if (olduname != NULL && strcmp(olduname, newuname) != 0) {
 
     /* Can change uid only id running as a root */
@@ -810,10 +813,12 @@
     newuid = verify_server_uname(newuname);
 
     if (newuid >= 0) {
-      if(change_uid_all(sroot, 0, newuid) == 0)
-	return update_conf("console.conf", "User", newuname);
-      else
+      if (change_uid_all(CONFIGDIR, 0, newuid) || change_uid_all(SECURITYDIR, 0, newuid) ||
+	  change_uid_all(LOGDIR, 0, newuid) || (pidfile && change_uid(pidfile, 0, newuid))) {
 	return -1;
+      } else {
+	return update_conf("console.conf", "User", newuname);
+      }
     }
     else {
       return -1;


--- snmpconf.c DELETED ---


--- snmpconf.properties DELETED ---


--- snmpmctl.c DELETED ---


--- snmpmctl.properties DELETED ---




More information about the Fedora-directory-commits mailing list