Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: client/site_tests/platform_MiniJailUidGid/src/platform_MiniJailUidGid.cc

Issue 3110010: [autotest] Update to compile against new libchrome (Closed) Base URL: http://src.chromium.org/git/autotest.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/site_tests/platform_MiniJailRootCapabilities/src/platform_MiniJailRootCapabilities.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <errno.h> 5 #include <errno.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h>
7 #include <unistd.h> 8 #include <unistd.h>
8 9
9 #include "base/command_line.h" 10 #include "base/command_line.h"
10 11
11 // Verifies that the process group id is what is expected. 12 // Verifies that the process group id is what is expected.
12 void CheckGid(uid_t gid) { 13 void CheckGid(uid_t gid) {
13 uid_t rgid; 14 uid_t rgid;
14 uid_t egid; 15 uid_t egid;
15 uid_t sgid; 16 uid_t sgid;
16 if (getresgid(&rgid, &egid, &sgid) != 0) { 17 if (getresgid(&rgid, &egid, &sgid) != 0) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 CheckUid(static_cast<uid_t>(uid)); 51 CheckUid(static_cast<uid_t>(uid));
51 } 52 }
52 53
53 if(cmd_line->HasSwitch("checkGid")) { 54 if(cmd_line->HasSwitch("checkGid")) {
54 int gid = atoi(cmd_line->GetSwitchValueASCII("checkGid").c_str()); 55 int gid = atoi(cmd_line->GetSwitchValueASCII("checkGid").c_str());
55 CheckGid(static_cast<uid_t>(gid)); 56 CheckGid(static_cast<uid_t>(gid));
56 } 57 }
57 58
58 return 0; 59 return 0;
59 } 60 }
OLDNEW
« no previous file with comments | « client/site_tests/platform_MiniJailRootCapabilities/src/platform_MiniJailRootCapabilities.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698