--- ac_clean/arch/um/drivers/umn_user.c Tue Apr 17 08:54:59 2001 +++ ac/arch/um/drivers/umn_user.c Tue Apr 17 20:02:21 2001 @@ -224,17 +224,27 @@ int slipno; sprintf(fd_name, "%d", fd); + + /* Try running umn_helper first */ if(!run_ifconfig(helper_args[0], helper_args, errors[0], sizeof(errors[0]))) return(0); - if((slipno = slipify(fd)) == -1){ - printk("umn - umn_helper failed : %s\n", errors[0]); - return(1); - } + + /* Then try setting up slip ourselves and then ifconfiging it + * with the old setuid ifconfig - this is for old 2.2 systems + * that don't have the current permissions checking in the slip + * driver. + */ + slipno = slipify(fd); sprintf(slip_name, "sl%d", slipno); - if(!run_ifconfig(ifconfig_args[0], ifconfig_args, errors[1], + if((slipno != -1) && + !run_ifconfig(ifconfig_args[0], ifconfig_args, errors[1], sizeof(errors[1]))) return(0); + + /* Now the only hope is that we're running as root and then we + * can run ifconfig directly + */ if(getuid() == 0){ ifconfig_args[0] = "ifconfig"; if(!run_ifconfig(ifconfig_args[0], ifconfig_args, errors[2],