Changeset b3e939a


Ignore:
Timestamp:
01/07/14 07:58:50 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
81e27dd, 4f9718b
Parents:
ba438ce
Message:

Fix a bug runing with PBIs on 10.0 with older wrapper version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pbi-manager/pbime/pbime.c

    r8188062 rb3e939a  
    4949        char mountscript[4096]; 
    5050        int jid, ngroups; 
     51        int argoffset; 
    5152        uid_t huid; 
    5253        struct passwd *husername, *jusername; 
     
    9091                err(1, "Could not chroot to: %s", newchroot); 
    9192 
    92         if (chdir(argv[4]) == -1 ) 
    93                 err(1, "Could not chdir to: %s", argv[4]); 
     93        argoffset=4; 
     94        if (chdir(argv[4]) == -1 ) { 
     95                // Running with old pbi wrapper 
     96                argoffset=3; 
     97        } 
    9498 
    9599        /* Get the user name in the jail */ 
     
    114118                err(1, "setusercontext"); 
    115119        login_close(lcap); 
    116         if (execvp(argv[3], argv + 4) == -1) 
     120        if (execvp(argv[3], argv + argoffset) == -1) 
    117121                err(1, "execvp(): %s", argv[3]); 
    118122        exit(0); 
Note: See TracChangeset for help on using the changeset viewer.