Bug 84296 - usernetctl calls improper located ifup script.
usernetctl calls improper located ifup script.
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2003-02-14 00:28 EST by SEKINE Tatsuo
Modified: 2014-03-16 22:34 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-30 14:31:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description SEKINE Tatsuo 2003-02-14 00:28:40 EST
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:

    Symlinks to /sbin/ifup and /sbin/ifdown, respectively.
    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 {
    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:

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 14:31:49 EDT
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.