VirtualBox

vbox的更動 12919 路徑 trunk/src/apps/tunctl


忽略:
時間撮記:
2008-10-2 上午09:51:55 (16 年 以前)
作者:
vboxsync
訊息:

signed/unsigned

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/apps/tunctl/tunctl.c

    r9548 r12919  
    120120  else {
    121121    /* emulate behaviour prior to TUNSETGROUP */
    122     if(owner == -1 && group == -1) {
     122    if(owner == (uid_t)-1 && group == (gid_t)-1) {
    123123      owner = geteuid();
    124124    }
    125125
    126     if(owner != -1) {
     126    if(owner != (uid_t)-1) {
    127127      if(ioctl(tap_fd, TUNSETOWNER, owner) < 0){
    128128        perror("TUNSETOWNER");
     
    130130      }
    131131    }
    132     if(group != -1) {
     132    if(group != (gid_t)-1) {
    133133      if(ioctl(tap_fd, TUNSETGROUP, group) < 0){
    134134        perror("TUNSETGROUP");
     
    146146    else {
    147147      printf("Set '%s' persistent and owned by", ifr.ifr_name);
    148       if(owner != -1)
     148      if(owner != (uid_t)-1)
    149149          printf(" uid %d", owner);
    150       if(group != -1)
     150      if(group != (gid_t)-1)
    151151          printf(" gid %d", group);
    152152      printf("\n");
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette