trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject git commit: TS-2115 buffer_upload hard-codes "nobody" user/group.
Date Thu, 31 Oct 2013 23:08:20 GMT
Updated Branches:
  refs/heads/master 84634608b -> ebb5e305b


TS-2115 buffer_upload hard-codes "nobody" user/group.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ebb5e305
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ebb5e305
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ebb5e305

Branch: refs/heads/master
Commit: ebb5e305b15d171d24dfa172eb1eaf73c09e948f
Parents: 8463460
Author: Kit Chan <chanshukit.gmail.com>
Authored: Thu Oct 31 17:07:55 2013 -0600
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Thu Oct 31 17:07:55 2013 -0600

----------------------------------------------------------------------
 CHANGES                                             |  3 +++
 plugins/experimental/buffer_upload/buffer_upload.cc | 15 ---------------
 2 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ebb5e305/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 9295d01..043f2e1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache Traffic Server 4.1.0
 
 
+  *) [TS-2115] buffer_upload hard-codes "nobody" user/group.
+   Author: Kit Chan.
+
   *) [TS-2208] Cache control with multiple suffixes.
     Author: bettydramit <b13621367396@gmail.com>
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ebb5e305/plugins/experimental/buffer_upload/buffer_upload.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/buffer_upload/buffer_upload.cc b/plugins/experimental/buffer_upload/buffer_upload.cc
index 9dda144..10d400e 100644
--- a/plugins/experimental/buffer_upload/buffer_upload.cc
+++ b/plugins/experimental/buffer_upload/buffer_upload.cc
@@ -36,7 +36,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <pwd.h>
 #include <dirent.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -946,27 +945,17 @@ create_directory()
   int i;
   DIR *dir;
   struct dirent *d;
-  struct passwd *pwd;
 
   if (getcwd(cwd, 4096) == NULL) {
     TSError("getcwd fails");
     return 0;
   }
 
-  if ((pwd = getpwnam("nobody")) == NULL) {
-    TSError("can't get passwd entry for \"nobody\"");
-    goto error_out;
-  }
-
   if (chdir(uconfig->base_dir) < 0) {
     if (mkdir(uconfig->base_dir, S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
       TSError("Unable to enter or create %s", uconfig->base_dir);
       goto error_out;
     }
-    if (chown(uconfig->base_dir, pwd->pw_uid, pwd->pw_gid) < 0) {
-      TSError("Unable to chown %s", uconfig->base_dir);
-      goto error_out;
-    }
     if (chdir(uconfig->base_dir) < 0) {
       TSError("Unable enter %s", uconfig->base_dir);
       goto error_out;
@@ -979,10 +968,6 @@ create_directory()
         TSError("Unable to enter or create %s/%s", uconfig->base_dir, str);
         goto error_out;
       }
-      if (chown(str, pwd->pw_uid, pwd->pw_gid) < 0) {
-        TSError("Unable to chown %s", str);
-        goto error_out;
-      }
       if (chdir(str) < 0) {
         TSError("Unable to enter %s/%s", uconfig->base_dir, str);
         goto error_out;


Mime
View raw message