admserv/cgi-src40/restartsrv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit f2a8c2e5e03f288c09325669bc6f5973b1d110c4
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jan 30 16:27:36 2013 -0800
Ticket #567 - Restart of Admin server from console fails on segfault
Bug description: The order of the argument 2 and 3 for
PL_strncpyz was not correct.
Definition of PL_strncpyz:
char * PL_strncpyz(char *dest, const char *src, PRUint32 max);
Fix description: This patch exchanges the 2nd and 3rd arguments.
Reviewed by Rich (Thank you!!)
diff --git a/admserv/cgi-src40/restartsrv.c b/admserv/cgi-src40/restartsrv.c
index 6e67d9b..87e76bf 100644
--- a/admserv/cgi-src40/restartsrv.c
+++ b/admserv/cgi-src40/restartsrv.c
@@ -184,10 +184,10 @@ int main(int argc, char *argv[])
break;
case 0:
#if defined(WITH_SYSTEMD)
- PL_strncpyz(line, sizeof(line), "/bin/systemctl restart " PACKAGE_NAME
".service");
+ PL_strncpyz(line, "/bin/systemctl restart " PACKAGE_NAME
".service", sizeof(line));
restart(line);
#elif defined(ENABLE_SERVICE)
- PL_strncpyz(line, sizeof(line), "service " PACKAGE_NAME "
restart");
+ PL_strncpyz(line, "service " PACKAGE_NAME " restart",
sizeof(line));
restart(line);
#else
if (util_find_file_in_paths(line, sizeof(line), "restart-ds-admin",
CMDBINDIR, "../..", "")) {
Show replies by date