bug 502897

Revert "[autotest] Pass current user into container for RPC usage"

This reverts commit 1491d7ad372612ee21ca024009ee2811d4c1f3f3.

Change-Id: I62a7275cf29ab627e8ef46e6e46c44304daada8c
Reviewed-on: https://chromium-review.googlesource.com/280785
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
diff --git a/global_config.ini b/global_config.ini
index d0abb88..e87cb00 100644
--- a/global_config.ini
+++ b/global_config.ini
@@ -315,10 +315,3 @@
 # commands: build_externals test_importer etc
 # Set this with service names that should be restarted after every update.
 # services:
-
-[SSP]
-# Section for configuration needed for server-side packaging.
-# User that runs the autoserv process in the host of the container.
-# The user is passed to a container through global config file so a process
-# running inside the container can use the same user to make RPC.
-user:
\ No newline at end of file
diff --git a/server/frontend.py b/server/frontend.py
index 7674e37..8b1f549 100644
--- a/server/frontend.py
+++ b/server/frontend.py
@@ -19,7 +19,6 @@
 from autotest_lib.client.common_lib import global_config
 from autotest_lib.client.common_lib import utils
 from autotest_lib.client.common_lib import control_data
-from autotest_lib.site_utils import lxc_utils
 from autotest_lib.tko import db
 
 
@@ -62,8 +61,6 @@
             print_log: pring a logging message to stdout on every operation
             debug: print out all RPC traffic
         """
-        if not user and lxc_utils.is_in_container():
-            user = GLOBAL_CONFIG.get_config_value('SSP', 'user', default=None)
         if not user:
             user = getpass.getuser()
         if not server:
diff --git a/site_utils/lxc_config.py b/site_utils/lxc_config.py
index d6b331c..b66689d 100644
--- a/site_utils/lxc_config.py
+++ b/site_utils/lxc_config.py
@@ -51,7 +51,6 @@
 """
 
 import collections
-import getpass
 import json
 import os
 import socket
@@ -220,9 +219,6 @@
         2. Update AUTOTEST_WEB/host and SERVER/hostname to be the IP of the host
            if any is set to localhost or 127.0.0.1. Otherwise, set it to be the
            FQDN of the config value.
-        3. Update SSP/user, which is used as the user makes RPC inside the
-           container. This allows the RPC to pass ACL check as if the call is
-           made in the host.
 
         """
         shadow_config = os.path.join(CONTAINER_AUTOTEST_DIR,
@@ -253,11 +249,6 @@
         self.container.attach_run('echo $\'\n[SERVER]\nhostname: %s\n\' >> %s' %
                                   (new_host, shadow_config))
 
-        # Update SSP/user
-        self.container.attach_run(
-                'echo $\'\n[SSP]\nuser: %s\n\' >> %s' %
-                (getpass.getuser(), shadow_config))
-
 
     def _modify_ssh_config(self):
         """Modify ssh config for it to work inside container.