Bug 84296

Summary: usernetctl calls improper located ifup script.
Product: [Retired] Red Hat Linux Reporter: SEKINE Tatsuo <sekine.t>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DEFERRED QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 18:31:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description SEKINE Tatsuo 2003-02-14 05:28:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.1) Gecko/20021030 for
VineLinux 0vl6

Description of problem:
In sysconfig.txt:
  /etc/sysconfig/network-scripts/ifup:
  /etc/sysconfig/network-scripts/ifdown:

    Symlinks to /sbin/ifup and /sbin/ifdown, respectively.
    (snip)
    only -- they'll will probably be removed in future versions, so
    only /sbin/ifup and /sbin/ifdown should currently be used.

But, usernetctl.c call those symlinks as below:
  main() in usernetctl.c line 132:
    if (!strcmp(argv[2], "up")) {
	cmd = "./ifup";
    } else if (!strcmp(argv[2], "down")) {
	cmd = "./ifdown";
    } else if (!strcmp(argv[2], "report")) {
	report = 1;
    } else {
	usage();
    }
    (snip)
    execle(cmd, cmd, ifaceConfig, NULL, safeEnviron);

Therefore, these two facts are inconsistent.
usernetctl should call /sbin/ifup or /sbin/ifdown.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. see source code or run commands as root:
  # strace -u some_user /usr/sbin/usernetctl eth0 up


Actual Results:
...
chdir("/etc/sysconfig/network-scripts") = 0
...
execve("./ifup", ["./ifup", "ifcfg-eth0"], [/* 2 vars */]) = 0
...


Expected Results:
...
execve("/sbin/ifup", ["/sbin/ifup", "ifcfg-eth0"], [/* 2 vars */]) = 0
...

# no need to chdir()


Additional info:

It's not a bug currently, but this potential bug may arise in future version.

Comment 1 Bill Nottingham 2005-09-30 18:31:49 UTC
I've clarified the comment in sysconfig.txt as of 8.12-1; it's not really useful
to remove the symlinks at this point.