The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* This file is used to define the properties of the filesystem |
| 18 | ** images generated by build tools (mkbootfs and mkyaffs2image) and |
| 19 | ** by the device side of adb. |
| 20 | */ |
| 21 | |
| 22 | #ifndef _ANDROID_FILESYSTEM_CONFIG_H_ |
| 23 | #define _ANDROID_FILESYSTEM_CONFIG_H_ |
| 24 | |
| 25 | #include <string.h> |
| 26 | #include <sys/stat.h> |
| 27 | #include <sys/types.h> |
| 28 | |
| 29 | /* This is the master Users and Groups config for the platform. |
| 30 | ** DO NOT EVER RENUMBER. |
| 31 | */ |
| 32 | |
| 33 | #define AID_ROOT 0 /* traditional unix root user */ |
| 34 | |
| 35 | #define AID_SYSTEM 1000 /* system server */ |
| 36 | |
| 37 | #define AID_RADIO 1001 /* telephony subsystem, RIL */ |
| 38 | #define AID_BLUETOOTH 1002 /* bluetooth subsystem */ |
| 39 | #define AID_GRAPHICS 1003 /* graphics devices */ |
| 40 | #define AID_INPUT 1004 /* input devices */ |
| 41 | #define AID_AUDIO 1005 /* audio devices */ |
| 42 | #define AID_CAMERA 1006 /* camera devices */ |
| 43 | #define AID_LOG 1007 /* log devices */ |
| 44 | #define AID_COMPASS 1008 /* compass device */ |
| 45 | #define AID_MOUNT 1009 /* mountd socket */ |
| 46 | #define AID_WIFI 1010 /* wifi subsystem */ |
| 47 | #define AID_ADB 1011 /* android debug bridge (adbd) */ |
| 48 | #define AID_INSTALL 1012 /* group for installing packages */ |
| 49 | #define AID_MEDIA 1013 /* mediaserver process */ |
| 50 | #define AID_DHCP 1014 /* dhcp client */ |
San Mehat | 6e1f215 | 2009-04-23 09:15:08 -0700 | [diff] [blame] | 51 | #define AID_SDCARD_RW 1015 /* external storage write access */ |
San Mehat | 4a6f232 | 2009-05-14 19:44:59 -0700 | [diff] [blame] | 52 | #define AID_VPN 1016 /* vpn system */ |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 53 | #define AID_KEYSTORE 1017 /* keystore subsystem */ |
Mike Lockwood | 93ac155 | 2010-05-06 13:30:09 -0400 | [diff] [blame] | 54 | #define AID_USB 1018 /* USB devices */ |
aimitakeshi | e572d59 | 2010-07-27 08:38:35 +0900 | [diff] [blame] | 55 | #define AID_DRM 1019 /* DRM server */ |
Robert Greenwalt | 1d91fcf | 2012-03-27 16:59:27 -0700 | [diff] [blame] | 56 | #define AID_MDNSR 1020 /* MulticastDNSResponder (service discovery) */ |
Mike Lockwood | c29919c | 2010-09-27 08:01:58 -0400 | [diff] [blame] | 57 | #define AID_GPS 1021 /* GPS daemon */ |
Jeff Hamilton | a6a36c0 | 2011-03-24 21:40:43 -0500 | [diff] [blame] | 58 | #define AID_UNUSED1 1022 /* deprecated, DO NOT USE */ |
Mike Lockwood | 2e0047b | 2010-10-29 10:55:54 -0400 | [diff] [blame] | 59 | #define AID_MEDIA_RW 1023 /* internal media storage write access */ |
Mike Lockwood | af7bdc6 | 2011-01-10 08:22:30 -0500 | [diff] [blame] | 60 | #define AID_MTP 1024 /* MTP USB driver access */ |
Nick Pelly | 097b4ed | 2011-11-21 14:55:59 -0800 | [diff] [blame] | 61 | #define AID_UNUSED2 1025 /* deprecated, DO NOT USE */ |
Jeffrey Tinker | 7005c03 | 2011-09-30 12:40:25 -0700 | [diff] [blame] | 62 | #define AID_DRMRPC 1026 /* group for drm rpc */ |
Nick Pelly | 097b4ed | 2011-11-21 14:55:59 -0800 | [diff] [blame] | 63 | #define AID_NFC 1027 /* nfc subsystem */ |
Dianne Hackborn | 50458cf | 2012-03-07 12:57:14 -0800 | [diff] [blame] | 64 | #define AID_SDCARD_R 1028 /* external storage read access */ |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 65 | |
| 66 | #define AID_SHELL 2000 /* adb and debug shell user */ |
| 67 | #define AID_CACHE 2001 /* cache access */ |
| 68 | #define AID_DIAG 2002 /* access to diagnostic resources */ |
| 69 | |
| 70 | /* The 3000 series are intended for use as supplemental group id's only. |
| 71 | * They indicate special Android capabilities that the kernel is aware of. */ |
| 72 | #define AID_NET_BT_ADMIN 3001 /* bluetooth: create any socket */ |
| 73 | #define AID_NET_BT 3002 /* bluetooth: create sco, rfcomm or l2cap sockets */ |
| 74 | #define AID_INET 3003 /* can create AF_INET and AF_INET6 sockets */ |
| 75 | #define AID_NET_RAW 3004 /* can create raw INET sockets */ |
Chia-chi Yeh | 88dc657 | 2009-06-19 14:59:08 +0800 | [diff] [blame] | 76 | #define AID_NET_ADMIN 3005 /* can configure interfaces and routing tables. */ |
Jeff Sharkey | 4f1df18 | 2011-05-02 17:52:03 -0700 | [diff] [blame] | 77 | #define AID_NET_BW_STATS 3006 /* read bandwidth statistics */ |
| 78 | #define AID_NET_BW_ACCT 3007 /* change bandwidth statistics accounting */ |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 79 | |
| 80 | #define AID_MISC 9998 /* access to misc storage */ |
| 81 | #define AID_NOBODY 9999 |
| 82 | |
Dianne Hackborn | ca185ab | 2012-02-09 11:19:00 -0800 | [diff] [blame] | 83 | #define AID_APP 10000 /* first app user */ |
| 84 | |
| 85 | #define AID_ISOLATED_START 99000 /* start of uids for fully isolated sandboxed processes */ |
| 86 | #define AID_ISOLATED_END 99999 /* end of uids for fully isolated sandboxed processes */ |
| 87 | |
| 88 | #define AID_USER 100000 /* offset for uid ranges for each user */ |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 89 | |
| 90 | #if !defined(EXCLUDE_FS_CONFIG_STRUCTURES) |
| 91 | struct android_id_info { |
| 92 | const char *name; |
| 93 | unsigned aid; |
| 94 | }; |
| 95 | |
Nick Kralevich | 4688ac5 | 2010-08-31 09:44:43 -0700 | [diff] [blame] | 96 | static const struct android_id_info android_ids[] = { |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 97 | { "root", AID_ROOT, }, |
| 98 | { "system", AID_SYSTEM, }, |
| 99 | { "radio", AID_RADIO, }, |
| 100 | { "bluetooth", AID_BLUETOOTH, }, |
| 101 | { "graphics", AID_GRAPHICS, }, |
| 102 | { "input", AID_INPUT, }, |
| 103 | { "audio", AID_AUDIO, }, |
| 104 | { "camera", AID_CAMERA, }, |
| 105 | { "log", AID_LOG, }, |
| 106 | { "compass", AID_COMPASS, }, |
| 107 | { "mount", AID_MOUNT, }, |
| 108 | { "wifi", AID_WIFI, }, |
| 109 | { "dhcp", AID_DHCP, }, |
| 110 | { "adb", AID_ADB, }, |
| 111 | { "install", AID_INSTALL, }, |
| 112 | { "media", AID_MEDIA, }, |
aimitakeshi | e572d59 | 2010-07-27 08:38:35 +0900 | [diff] [blame] | 113 | { "drm", AID_DRM, }, |
Robert Greenwalt | 1d91fcf | 2012-03-27 16:59:27 -0700 | [diff] [blame] | 114 | { "mdnsr", AID_MDNSR, }, |
Nick Pelly | 85905a6 | 2010-10-14 23:30:51 -0700 | [diff] [blame] | 115 | { "nfc", AID_NFC, }, |
Jeffrey Tinker | 7005c03 | 2011-09-30 12:40:25 -0700 | [diff] [blame] | 116 | { "drmrpc", AID_DRMRPC, }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 117 | { "shell", AID_SHELL, }, |
| 118 | { "cache", AID_CACHE, }, |
| 119 | { "diag", AID_DIAG, }, |
| 120 | { "net_bt_admin", AID_NET_BT_ADMIN, }, |
| 121 | { "net_bt", AID_NET_BT, }, |
Dianne Hackborn | 5d3aadb | 2012-03-12 10:54:11 -0700 | [diff] [blame] | 122 | { "sdcard_r", AID_SDCARD_R, }, |
San Mehat | 6e1f215 | 2009-04-23 09:15:08 -0700 | [diff] [blame] | 123 | { "sdcard_rw", AID_SDCARD_RW, }, |
Mike Lockwood | 2e0047b | 2010-10-29 10:55:54 -0400 | [diff] [blame] | 124 | { "media_rw", AID_MEDIA_RW, }, |
San Mehat | 4a6f232 | 2009-05-14 19:44:59 -0700 | [diff] [blame] | 125 | { "vpn", AID_VPN, }, |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 126 | { "keystore", AID_KEYSTORE, }, |
Mike Lockwood | 93ac155 | 2010-05-06 13:30:09 -0400 | [diff] [blame] | 127 | { "usb", AID_USB, }, |
Mike Lockwood | af7bdc6 | 2011-01-10 08:22:30 -0500 | [diff] [blame] | 128 | { "mtp", AID_MTP, }, |
Mike Lockwood | c29919c | 2010-09-27 08:01:58 -0400 | [diff] [blame] | 129 | { "gps", AID_GPS, }, |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 130 | { "inet", AID_INET, }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 131 | { "net_raw", AID_NET_RAW, }, |
Chia-chi Yeh | 88dc657 | 2009-06-19 14:59:08 +0800 | [diff] [blame] | 132 | { "net_admin", AID_NET_ADMIN, }, |
Jeff Sharkey | 4f1df18 | 2011-05-02 17:52:03 -0700 | [diff] [blame] | 133 | { "net_bw_stats", AID_NET_BW_STATS, }, |
| 134 | { "net_bw_acct", AID_NET_BW_ACCT, }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 135 | { "misc", AID_MISC, }, |
| 136 | { "nobody", AID_NOBODY, }, |
| 137 | }; |
| 138 | |
| 139 | #define android_id_count \ |
| 140 | (sizeof(android_ids) / sizeof(android_ids[0])) |
Doug Zongker | 08c370c | 2012-05-03 14:16:54 -0700 | [diff] [blame] | 141 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 142 | struct fs_path_config { |
| 143 | unsigned mode; |
| 144 | unsigned uid; |
| 145 | unsigned gid; |
| 146 | const char *prefix; |
| 147 | }; |
| 148 | |
| 149 | /* Rules for directories. |
| 150 | ** These rules are applied based on "first match", so they |
| 151 | ** should start with the most specific path and work their |
| 152 | ** way up to the root. |
| 153 | */ |
| 154 | |
| 155 | static struct fs_path_config android_dirs[] = { |
| 156 | { 00770, AID_SYSTEM, AID_CACHE, "cache" }, |
| 157 | { 00771, AID_SYSTEM, AID_SYSTEM, "data/app" }, |
| 158 | { 00771, AID_SYSTEM, AID_SYSTEM, "data/app-private" }, |
| 159 | { 00771, AID_SYSTEM, AID_SYSTEM, "data/dalvik-cache" }, |
| 160 | { 00771, AID_SYSTEM, AID_SYSTEM, "data/data" }, |
| 161 | { 00771, AID_SHELL, AID_SHELL, "data/local/tmp" }, |
| 162 | { 00771, AID_SHELL, AID_SHELL, "data/local" }, |
| 163 | { 01771, AID_SYSTEM, AID_MISC, "data/misc" }, |
| 164 | { 00770, AID_DHCP, AID_DHCP, "data/misc/dhcp" }, |
Paul Eastham | 1ace223 | 2011-02-03 17:12:47 -0800 | [diff] [blame] | 165 | { 00775, AID_MEDIA_RW, AID_MEDIA_RW, "data/media" }, |
| 166 | { 00775, AID_MEDIA_RW, AID_MEDIA_RW, "data/media/Music" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 167 | { 00771, AID_SYSTEM, AID_SYSTEM, "data" }, |
| 168 | { 00750, AID_ROOT, AID_SHELL, "sbin" }, |
| 169 | { 00755, AID_ROOT, AID_SHELL, "system/bin" }, |
Brian Swetland | 02863b9 | 2010-09-19 03:36:39 -0700 | [diff] [blame] | 170 | { 00755, AID_ROOT, AID_SHELL, "system/vendor" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 171 | { 00755, AID_ROOT, AID_SHELL, "system/xbin" }, |
Chia-chi Yeh | 88dc657 | 2009-06-19 14:59:08 +0800 | [diff] [blame] | 172 | { 00755, AID_ROOT, AID_ROOT, "system/etc/ppp" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 173 | { 00777, AID_ROOT, AID_ROOT, "sdcard" }, |
| 174 | { 00755, AID_ROOT, AID_ROOT, 0 }, |
| 175 | }; |
| 176 | |
| 177 | /* Rules for files. |
| 178 | ** These rules are applied based on "first match", so they |
| 179 | ** should start with the most specific path and work their |
| 180 | ** way up to the root. Prefixes ending in * denotes wildcard |
| 181 | ** and will allow partial matches. |
| 182 | */ |
| 183 | static struct fs_path_config android_files[] = { |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 184 | { 00440, AID_ROOT, AID_SHELL, "system/etc/init.goldfish.rc" }, |
| 185 | { 00550, AID_ROOT, AID_SHELL, "system/etc/init.goldfish.sh" }, |
| 186 | { 00440, AID_ROOT, AID_SHELL, "system/etc/init.trout.rc" }, |
| 187 | { 00550, AID_ROOT, AID_SHELL, "system/etc/init.ril" }, |
| 188 | { 00550, AID_ROOT, AID_SHELL, "system/etc/init.testmenu" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 189 | { 00550, AID_DHCP, AID_SHELL, "system/etc/dhcpcd/dhcpcd-run-hooks" }, |
| 190 | { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/dbus.conf" }, |
Jaikumar Ganesh | eafdd86 | 2010-01-07 20:24:55 -0800 | [diff] [blame] | 191 | { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/main.conf" }, |
| 192 | { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/input.conf" }, |
| 193 | { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/audio.conf" }, |
Danica Chang | 78fdd23 | 2010-08-12 15:42:30 -0700 | [diff] [blame] | 194 | { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluetooth/network.conf" }, |
Eric Olsen | 3555019 | 2010-03-16 10:22:06 -0700 | [diff] [blame] | 195 | { 00444, AID_NET_BT, AID_NET_BT, "system/etc/bluetooth/blacklist.conf" }, |
Jaikumar Ganesh | eafdd86 | 2010-01-07 20:24:55 -0800 | [diff] [blame] | 196 | { 00640, AID_SYSTEM, AID_SYSTEM, "system/etc/bluetooth/auto_pairing.conf" }, |
Jean-Baptiste Queru | b084929 | 2009-10-02 11:08:55 -0700 | [diff] [blame] | 197 | { 00444, AID_RADIO, AID_AUDIO, "system/etc/AudioPara4.csv" }, |
Chia-chi Yeh | 88dc657 | 2009-06-19 14:59:08 +0800 | [diff] [blame] | 198 | { 00555, AID_ROOT, AID_ROOT, "system/etc/ppp/*" }, |
Bruce Beare | 96a2bb6 | 2010-06-24 14:36:38 -0700 | [diff] [blame] | 199 | { 00555, AID_ROOT, AID_ROOT, "system/etc/rc.*" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 200 | { 00644, AID_SYSTEM, AID_SYSTEM, "data/app/*" }, |
Paul Eastham | 1ace223 | 2011-02-03 17:12:47 -0800 | [diff] [blame] | 201 | { 00644, AID_MEDIA_RW, AID_MEDIA_RW, "data/media/*" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 202 | { 00644, AID_SYSTEM, AID_SYSTEM, "data/app-private/*" }, |
| 203 | { 00644, AID_APP, AID_APP, "data/data/*" }, |
| 204 | /* the following two files are INTENTIONALLY set-gid and not set-uid. |
| 205 | * Do not change. */ |
| 206 | { 02755, AID_ROOT, AID_NET_RAW, "system/bin/ping" }, |
Nick Kralevich | 3e1aac6 | 2010-03-08 11:36:10 -0800 | [diff] [blame] | 207 | { 02750, AID_ROOT, AID_INET, "system/bin/netcfg" }, |
David 'Digit' Turner | 1f4d952 | 2010-03-02 18:05:23 -0800 | [diff] [blame] | 208 | /* the following five files are INTENTIONALLY set-uid, but they |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 209 | * are NOT included on user builds. */ |
| 210 | { 06755, AID_ROOT, AID_ROOT, "system/xbin/su" }, |
| 211 | { 06755, AID_ROOT, AID_ROOT, "system/xbin/librank" }, |
| 212 | { 06755, AID_ROOT, AID_ROOT, "system/xbin/procrank" }, |
| 213 | { 06755, AID_ROOT, AID_ROOT, "system/xbin/procmem" }, |
Dan Egnor | 328a4fb | 2009-05-15 12:57:58 -0700 | [diff] [blame] | 214 | { 06755, AID_ROOT, AID_ROOT, "system/xbin/tcpdump" }, |
Wink Saville | bbf1c64 | 2010-03-11 16:22:44 -0800 | [diff] [blame] | 215 | { 04770, AID_ROOT, AID_RADIO, "system/bin/pppd-ril" }, |
David 'Digit' Turner | 1f4d952 | 2010-03-02 18:05:23 -0800 | [diff] [blame] | 216 | /* the following file is INTENTIONALLY set-uid, and IS included |
| 217 | * in user builds. */ |
| 218 | { 06750, AID_ROOT, AID_SHELL, "system/bin/run-as" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 219 | { 00755, AID_ROOT, AID_SHELL, "system/bin/*" }, |
Brad Fitzpatrick | 8d1c6e7 | 2011-03-01 15:12:11 -0800 | [diff] [blame] | 220 | { 00755, AID_ROOT, AID_ROOT, "system/lib/valgrind/*" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 221 | { 00755, AID_ROOT, AID_SHELL, "system/xbin/*" }, |
Brian Swetland | 02863b9 | 2010-09-19 03:36:39 -0700 | [diff] [blame] | 222 | { 00755, AID_ROOT, AID_SHELL, "system/vendor/bin/*" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 223 | { 00750, AID_ROOT, AID_SHELL, "sbin/*" }, |
| 224 | { 00755, AID_ROOT, AID_ROOT, "bin/*" }, |
| 225 | { 00750, AID_ROOT, AID_SHELL, "init*" }, |
Dima Zavin | f48b236 | 2011-08-30 10:46:09 -0700 | [diff] [blame] | 226 | { 00750, AID_ROOT, AID_SHELL, "charger*" }, |
Ken Sumrall | c1bf896 | 2012-01-06 19:09:42 -0800 | [diff] [blame] | 227 | { 00750, AID_ROOT, AID_SHELL, "sbin/fs_mgr" }, |
Doug Zongker | 0e6056d | 2012-05-07 16:48:09 -0700 | [diff] [blame^] | 228 | { 00640, AID_ROOT, AID_SHELL, "fstab.*" }, |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 229 | { 00644, AID_ROOT, AID_ROOT, 0 }, |
| 230 | }; |
| 231 | |
| 232 | static inline void fs_config(const char *path, int dir, |
| 233 | unsigned *uid, unsigned *gid, unsigned *mode) |
| 234 | { |
| 235 | struct fs_path_config *pc; |
| 236 | int plen; |
Doug Zongker | 08c370c | 2012-05-03 14:16:54 -0700 | [diff] [blame] | 237 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 238 | pc = dir ? android_dirs : android_files; |
| 239 | plen = strlen(path); |
| 240 | for(; pc->prefix; pc++){ |
| 241 | int len = strlen(pc->prefix); |
| 242 | if (dir) { |
| 243 | if(plen < len) continue; |
| 244 | if(!strncmp(pc->prefix, path, len)) break; |
| 245 | continue; |
| 246 | } |
| 247 | /* If name ends in * then allow partial matches. */ |
| 248 | if (pc->prefix[len -1] == '*') { |
| 249 | if(!strncmp(pc->prefix, path, len - 1)) break; |
| 250 | } else if (plen == len){ |
| 251 | if(!strncmp(pc->prefix, path, len)) break; |
| 252 | } |
| 253 | } |
| 254 | *uid = pc->uid; |
| 255 | *gid = pc->gid; |
| 256 | *mode = (*mode & (~07777)) | pc->mode; |
Doug Zongker | 08c370c | 2012-05-03 14:16:54 -0700 | [diff] [blame] | 257 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 258 | #if 0 |
Doug Zongker | 08c370c | 2012-05-03 14:16:54 -0700 | [diff] [blame] | 259 | fprintf(stderr,"< '%s' '%s' %d %d %o >\n", |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 260 | path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode); |
| 261 | #endif |
| 262 | } |
| 263 | #endif |
| 264 | #endif |