Bug 50698 - two different ntp usage messages?
two different ntp usage messages?
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: ntp (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Brian Brock
:
: 50526 52763 53099 53215 54313 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-02 06:54 EDT by Jonathan Kamens
Modified: 2007-04-18 12:35 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-30 20:30:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2001-08-02 06:54:13 EDT
# ntpd -h
ntpd: unknown option -h
usage: ntpd [ -abdgmnqx ] [ -c config_file ] [ -e e_delay ]
                [ -f freq_file ] [ -k key_file ] [ -l log_file ]
                [ -p pid_file ] [ -r broad_delay ] [ -s statdir ]
                [ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]
                [ -T chroot_dir ] [ -U server_user ]
                [ -P fixed_process_priority ]
# ntpd -n -U ntp
usage: ntpd [ -abdgmnx ] [ -c config_file ] [ -e e_delay ]
                [ -f freq_file ] [ -k key_file ] [ -l log_file ]
                [ -p pid_file ] [ -r broad_delay ] [ -s statdir ]
                [ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]
                [ -P fixed_process_priority ]
# 

Note how the two usage messages above are different -- one mentions -T and
-U and the other doesn't!
Comment 1 Harald Hoyer 2001-08-02 06:56:49 EDT
will be fixed in 4.0.99mrc2-5. But first I want to fix other bugs.. thx

Comment 2 Harald Hoyer 2001-08-29 04:58:43 EDT
*** Bug 52763 has been marked as a duplicate of this bug. ***
Comment 3 Harald Hoyer 2001-08-29 05:01:46 EDT
*** Bug 50526 has been marked as a duplicate of this bug. ***
Comment 4 Harald Hoyer 2001-08-29 05:08:04 EDT
ok, really fixed in 4.0.99mrc2-5
Comment 5 Enrico Scholz 2001-08-30 06:16:01 EDT
In -5 `-U ntp' works but ntpd becomes a random user:

| $ service ntpd restart
| $ ls -ld /proc/`/sbin/pidof ntpd`
| dr-xr-xr-x    3 1075437652 134767660        0 Aug 30 12:20 /proc/3633
| $ id ntp
| uid=38(ntp) gid=38(ntp) groups=38(ntp)
Comment 6 Enrico Scholz 2001-08-30 18:36:19 EDT
Bad user happens because of uninitialized variables `server_uid' + `server_gid'. 

ntpd/ntpd.c:

1. declares server_uid/server_gid and sets server_user to NULL
2. gets debug settings (line 441) via getstartup()
3. `if (server_user) { ... initialize server_uid/gid ... }' --> does not happen, 
   because server_user is still null
4. calculates `server_user' later
5. calls drop_root() with the uninitialized server_uid/gid values

Perhaps evaluation of the `-U' option should happen in the getstartup() routine
already and not in the getCmdOpts() one which is called later.
Comment 7 Harald Hoyer 2001-08-31 02:17:47 EDT
already fixed in ntp-4.1.0-1 ... :)
Comment 8 Harald Hoyer 2001-09-03 13:45:03 EDT
*** Bug 53099 has been marked as a duplicate of this bug. ***
Comment 9 Harald Hoyer 2001-09-05 06:37:13 EDT
*** Bug 53215 has been marked as a duplicate of this bug. ***
Comment 10 Harald Hoyer 2001-10-04 04:45:59 EDT
*** Bug 54313 has been marked as a duplicate of this bug. ***

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