vbox的更動 12919 路徑 trunk/src/apps/tunctl
- 時間撮記:
- 2008-10-2 上午09:51:55 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/apps/tunctl/tunctl.c
r9548 r12919 120 120 else { 121 121 /* emulate behaviour prior to TUNSETGROUP */ 122 if(owner == -1 && group ==-1) {122 if(owner == (uid_t)-1 && group == (gid_t)-1) { 123 123 owner = geteuid(); 124 124 } 125 125 126 if(owner != -1) {126 if(owner != (uid_t)-1) { 127 127 if(ioctl(tap_fd, TUNSETOWNER, owner) < 0){ 128 128 perror("TUNSETOWNER"); … … 130 130 } 131 131 } 132 if(group != -1) {132 if(group != (gid_t)-1) { 133 133 if(ioctl(tap_fd, TUNSETGROUP, group) < 0){ 134 134 perror("TUNSETGROUP"); … … 146 146 else { 147 147 printf("Set '%s' persistent and owned by", ifr.ifr_name); 148 if(owner != -1)148 if(owner != (uid_t)-1) 149 149 printf(" uid %d", owner); 150 if(group != -1)150 if(group != (gid_t)-1) 151 151 printf(" gid %d", group); 152 152 printf("\n");
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器