Bug 84296 - usernetctl calls improper located ifup script.
Summary: usernetctl calls improper located ifup script.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-14 05:28 UTC by SEKINE Tatsuo
Modified: 2014-03-17 02:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-30 18:31:49 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.