Changeset 12919 in vbox for trunk/src/apps/tunctl
- Timestamp:
- Oct 2, 2008 9:51:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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");
Note:
See TracChangeset
for help on using the changeset viewer.