| Index: chromeos/process.h
|
| diff --git a/chromeos/process.h b/chromeos/process.h
|
| index 9c45bfa15cae35e4732181cbb50fda90d4e78882..4f6bfda70145aebc87d229b61d54c93521115635 100644
|
| --- a/chromeos/process.h
|
| +++ b/chromeos/process.h
|
| @@ -51,6 +51,12 @@ class Process {
|
| // from child process's perspective iff |is_input|.
|
| virtual void RedirectUsingPipe(int child_fd, bool is_input) = 0;
|
|
|
| + // Set the real/effective/saved user ID of the child process.
|
| + virtual void SetUid(uid_t uid) = 0;
|
| +
|
| + // Set the real/effective/saved group ID of the child process.
|
| + virtual void SetGid(gid_t gid) = 0;
|
| +
|
| // Gets the pipe file descriptor mapped to the process's |child_fd|.
|
| virtual int GetPipe(int child_fd) = 0;
|
|
|
| @@ -100,6 +106,8 @@ class ProcessImpl : public Process {
|
| virtual void AddArg(const std::string& arg);
|
| virtual void RedirectOutput(const std::string& output_file);
|
| virtual void RedirectUsingPipe(int child_fd, bool is_input);
|
| + virtual void SetUid(uid_t uid);
|
| + virtual void SetGid(gid_t gid);
|
| virtual int GetPipe(int child_fd);
|
| virtual bool Start();
|
| virtual int Wait();
|
| @@ -122,12 +130,6 @@ class ProcessImpl : public Process {
|
| };
|
| typedef std::map<int, PipeInfo> PipeMap;
|
|
|
| - std::string output_file_;
|
| - std::vector<std::string> arguments_;
|
| - // Map of child target file descriptors (first) to information about
|
| - // pipes created (second).
|
| - PipeMap pipe_map_;
|
| -
|
| void UpdatePid(pid_t new_pid);
|
| bool PopulatePipeMap();
|
|
|
| @@ -136,6 +138,13 @@ class ProcessImpl : public Process {
|
| // process. pid must not be modified except by calling
|
| // UpdatePid(new_pid).
|
| pid_t pid_;
|
| + std::string output_file_;
|
| + std::vector<std::string> arguments_;
|
| + // Map of child target file descriptors (first) to information about
|
| + // pipes created (second).
|
| + PipeMap pipe_map_;
|
| + uid_t uid_;
|
| + gid_t gid_;
|
| };
|
|
|
| } // namespace chromeos
|
|
|