[Fedora-directory-commits] adminserver/admserv/cgi-src40 restartsrv.c, 1.7, 1.8 stopsrv.c, 1.6, 1.7 viewlog.c, 1.7, 1.8

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Tue May 15 16:45:47 UTC 2007


Author: rmeggins

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

Modified Files:
	restartsrv.c stopsrv.c viewlog.c 
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) viewlog had a couple of bugs.  I also added some tests for viewlog
2) The start, stop, and restart scripts have been renamed
3) Move the cgid socket to /var/run/fedora-ds and rename to make it unique
4) Forgot the trailing slash on some of the paths in admserv.conf.  I also needed to add the html directory, and fix the location match pattern matching for the command and task urls



Index: restartsrv.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/restartsrv.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- restartsrv.c	11 May 2007 19:44:05 -0000	1.7
+++ restartsrv.c	15 May 2007 16:45:45 -0000	1.8
@@ -179,7 +179,7 @@
 		 NULL, NULL);
     break;
   case 0:
-    if (util_find_file_in_paths(line,  sizeof(line), "restart-admin", CMDBINDIR, "../..", "")) {
+    if (util_find_file_in_paths(line,  sizeof(line), "restart-ds-admin", CMDBINDIR, "../..", "")) {
         restart(line);
     }
     exit(0);


Index: stopsrv.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/stopsrv.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- stopsrv.c	9 May 2007 00:26:30 -0000	1.6
+++ stopsrv.c	15 May 2007 16:45:45 -0000	1.7
@@ -140,7 +140,7 @@
 #else
     sleep(5);
 #endif
-    if (util_find_file_in_paths(line,  sizeof(line), "stop-admin", CMDBINDIR, "../..", "")) {
+    if (util_find_file_in_paths(line,  sizeof(line), "stop-ds-admin", CMDBINDIR, "../..", "")) {
         system(line);
     }
     exit(0);


Index: viewlog.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewlog.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- viewlog.c	11 May 2007 19:44:05 -0000	1.7
+++ viewlog.c	15 May 2007 16:45:45 -0000	1.8
@@ -247,7 +247,7 @@
       return PL_strdup(logdir);
     } else if (!strncmp(id, "slapd-", 6)) {
       /* DIRECTORY SERVER and admin server share the same log dir parent */
-      return_dir = PR_smprintf("%s%c..%s%s", logdir, FILE_PATHSEP, FILE_PATHSEP, id);
+      return_dir = PR_smprintf("%s%c..%c%s", logdir, FILE_PATHSEP, FILE_PATHSEP, id);
     }
   }
 
@@ -265,7 +265,7 @@
     char *num=NULL;
     char *str=NULL;
     char *file;
-    char *logdir;
+    char *logdir = NULL;
     char *id;
     char **logfiles = NULL;
     char tmp[BIG_LINE];
@@ -339,8 +339,8 @@
 		fflush(stdout);
 #endif
 		if (!file || !*file ||
-		    util_is_valid_path_string(file) ||
-		    util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) {
+		    !util_is_valid_path_string(file) ||
+		    !util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) {
 		  continue;
 		}
 




More information about the Fedora-directory-commits mailing list