trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geor...@apache.org
Subject svn commit: r901808 - in /incubator/trafficserver/traffic/trunk: configure.ac proxy/Makefile.am proxy/config/records.config.in proxy/mgmt2/Makefile.am proxy/mgmt2/RecordsConfig.cc proxy/mgmt2/cop/Makefile.am proxy/mgmt2/cop/TrafficCop.cc
Date Thu, 21 Jan 2010 18:08:41 GMT
Author: georgep
Date: Thu Jan 21 18:08:40 2010
New Revision: 901808

URL: http://svn.apache.org/viewvc?rev=901808&view=rev
Log:
TS-15: The chanages are a modified patch of 'fix-nobody-user.patch' submitted by 'mturk@apache.org'
and updates TrafficCop.cc and RecordsConfig.cc also. By default the $pkgsysuser and $pkgsysgroup
is the current user doing the build. To enable a different system user and group use the '-with-user=<newuser>'
and '-with-group=<newgroup>' options with 'configure'.
Review: Leif
Tested: ubuntu804,fedora11

Modified:
    incubator/trafficserver/traffic/trunk/configure.ac
    incubator/trafficserver/traffic/trunk/proxy/Makefile.am
    incubator/trafficserver/traffic/trunk/proxy/config/records.config.in
    incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am
    incubator/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
    incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am
    incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc

Modified: incubator/trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/configure.ac?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/configure.ac (original)
+++ incubator/trafficserver/traffic/trunk/configure.ac Thu Jan 21 18:08:40 2010
@@ -50,6 +50,26 @@
 AC_DEFINE_UNQUOTED(BUILD_PERSON, "$build_person")
 AC_DEFINE_UNQUOTED(BUILD_MACHINE, "$build_machine")
 
+AC_ARG_WITH([user],
+  [AS_HELP_STRING([--with-user],[specify the system user])],
+  [
+  with_user="$withval"
+  ],[
+  with_user="$build_person"
+  ]
+)
+
+AC_ARG_WITH([group],
+  [AS_HELP_STRING([--with-group],[specify the system group])],
+  [
+  with_group="$withval"
+  ],[
+  with_group="$with_user"
+  ]
+)
+AC_SUBST([pkgsysuser],[$with_user])
+AC_SUBST([pkgsysgroup],[$with_group])
+
 # -----------------------------------------------------------------------------
 # 2. SITE CONFIGURATION
 

Modified: incubator/trafficserver/traffic/trunk/proxy/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/Makefile.am?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/Makefile.am (original)
+++ incubator/trafficserver/traffic/trunk/proxy/Makefile.am Thu Jan 21 18:08:40 2010
@@ -74,6 +74,7 @@
   -DPREFIX=\"$(prefix)\" \
   -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
   -DPKGLOCALSTATEDIR=\"$(pkglocalstatedir)\" \
+  -DPKGSYSUSER=\"$(pkgsysuser)\" \
   $(AM_CPPFLAGS)
 
 traffic_server_SOURCES = \
@@ -382,7 +383,7 @@
 dist_version_DATA = TS_version
 
 install-exec-local:
-	$(INSTALL) -d -o nobody -g nobody $(pkglocalstatedir) $(pkglogdir) $(pkgsysconfdir) $(pkgsysconfdir)/internal
+	$(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(pkglocalstatedir) $(pkglogdir) $(pkgsysconfdir)
$(pkgsysconfdir)/internal
 	$(INSTALL) -d $(pkglibexecdir)
 
 uninstall-local:

Modified: incubator/trafficserver/traffic/trunk/proxy/config/records.config.in
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/config/records.config.in?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/config/records.config.in (original)
+++ incubator/trafficserver/traffic/trunk/proxy/config/records.config.in Thu Jan 21 18:08:40
2010
@@ -29,7 +29,7 @@
 CONFIG proxy.config.env_prep STRING example_prep.sh
 CONFIG proxy.config.config_dir STRING @prefix@/etc/@PACKAGE@
 CONFIG proxy.config.temp_dir STRING /tmp
-CONFIG proxy.config.alarm_email STRING nobody
+CONFIG proxy.config.alarm_email STRING @pkgsysuser@
 CONFIG proxy.config.syslog_facility STRING LOG_DAEMON
 CONFIG proxy.config.cop.core_signal INT 0
 CONFIG proxy.config.output.logfile STRING traffic.out
@@ -66,7 +66,7 @@
 CONFIG proxy.config.admin.use_ssl INT 0
 CONFIG proxy.config.admin.ssl_cert_file STRING private_key.pem
 CONFIG proxy.config.admin.number_config_bak INT 3
-CONFIG proxy.config.admin.user_id STRING nobody
+CONFIG proxy.config.admin.user_id STRING @pkgsysuser@
 CONFIG proxy.config.admin.ui_refresh_rate INT 30
 CONFIG proxy.config.admin.log_mgmt_access INT 0
 CONFIG proxy.config.admin.log_resolve_hostname INT 1

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/Makefile.am Thu Jan 21 18:08:40 2010
@@ -39,7 +39,8 @@
   -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \
   -DPKGLOCALSTATEDIR=\"$(pkglocalstatedir)\" \
   -DPKGLOGDIR=\"$(pkglogdir)\" \
-  -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
+  -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
+  -DPKGSYSUSER=\"$(pkgsysuser)\" 
 
 MGMT_DEFS = @MGMT_DEFS@
 DEFS += $(MGMT_DEFS)

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc Thu Jan 21 18:08:40
2010
@@ -82,7 +82,7 @@
   ,
   {CONFIG, "proxy.config.temp_dir", "", INK_STRING, "/tmp", RU_NULL, RR_NULL, RC_NULL, NULL,
RA_NULL}
   ,
-  {CONFIG, "proxy.config.alarm_email", "", INK_STRING, NULL, RU_REREAD, RR_NULL, RC_STR,
".*", RA_NULL}
+  {CONFIG, "proxy.config.alarm_email", "", INK_STRING, PKGSYSUSER, RU_REREAD, RR_NULL, RC_STR,
".*", RA_NULL}
   ,
   {CONFIG, "proxy.config.syslog_facility", "", INK_STRING, "LOG_DAEMON", RU_NULL, RR_NULL,
RC_NULL, NULL, RA_NULL}
   ,
@@ -352,7 +352,7 @@
   ,
   {CONFIG, "proxy.config.admin.number_config_bak", "", INK_INT, "3", RU_NULL, RR_NULL, RC_NULL,
NULL, RA_NULL}
   ,
-  {CONFIG, "proxy.config.admin.user_id", "", INK_STRING, "<running_user>", RU_NULL,
RR_REQUIRED, RC_NULL, NULL, RA_NULL}
+  {CONFIG, "proxy.config.admin.user_id", "", INK_STRING, PKGSYSUSER, RU_NULL, RR_REQUIRED,
RC_NULL, NULL, RA_NULL}
   ,
   {CONFIG, "proxy.config.admin.ui_refresh_rate", "", INK_INT, "30", RU_REREAD, RR_NULL, RC_NULL,
NULL, RA_NULL}
   ,

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/Makefile.am Thu Jan 21 18:08:40
2010
@@ -29,7 +29,8 @@
   -DPREFIX=\"$(prefix)\" \
   -DPKGLOCALSTATEDIR=\"$(pkglocalstatedir)\" \
   -DPKGLOGDIR=\"$(pkglogdir)\" \
-  -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
+  -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
+  -DPKGSYSUSER=\"$(pkgsysuser)\" 
 
 MGMT_DEFS = @MGMT_DEFS@
 DEFS += $(MGMT_DEFS)

Modified: incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=901808&r1=901807&r2=901808&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ incubator/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Thu Jan 21 18:08:40
2010
@@ -76,7 +76,8 @@
 static int killsig = SIGKILL;
 static int coresig = 0;
 
-static char admin_user[80] = "nobody";
+static char sys_user[80] = PKGSYSUSER;
+static char admin_user[80] = PKGSYSUSER;
 static char manager_binary[PATH_MAX] = "traffic_manager";
 static char server_binary[PATH_MAX] = "traffic_server";
 static char manager_options[OPTIONS_LEN_MAX] = "";
@@ -670,10 +671,9 @@
 
   // Get the admin user
   read_config_string("proxy.config.admin.user_id", admin_user, sizeof(admin_user));
-
-  // bitch if the admin user is not "nobody"
-  if (strncmp("nobody", admin_user, sizeof(admin_user)) != 0) {
-    cop_log(COP_WARNING, "proxy.config.admin.user_id should be \"nobody\"");
+  // just warn if the admin user is not the configured system user
+  if (strncmp(sys_user, admin_user, sizeof(admin_user)) != 0) {
+    cop_log(COP_WARNING, "proxy.config.admin.user_id should be \"%s\"",sys_user);
   }
 
   read_config_string("proxy.config.manager_binary", manager_binary, sizeof(manager_binary));



Mime
View raw message