Command line confusion
Hal Murray
hmurray at megapathdsl.net
Thu Jun 1 10:23:46 UTC 2017
Context is I'm chasing a bogus free if you start ntpd -u with a number rather
than a user name.
This is on a Fedora system using systemd
/usr/lib/systemd/system/ntpd.service says
EnvironmentFile=/etc/sysconfig/ntpd
ExecStart=/usr/local/sbin/ntpd -u ntp:ntp $OPTIONS
/etc/sysconfig/ntpd says:
OPTIONS="-g"
systemctl status ntpd says:
Process: 7392 ExecStart=/usr/local/sbin/ntpd -u ntp:ntp $OPTIONS
(code=exited,
CGroup: /system.slice/ntpd.service
ââ7393 /usr/local/sbin/ntpd -u ntp ntp -g
ps says:
11654 ? SLs 0:01 /usr/local/sbin/ntpd -u ntp ntp -g
I've seen it do DNS lookups for ntp and -g, but that doesn't happen when
started via systemd. I think that happened when I started ntpd by hand and
copied the "-u ntp ntp -g" from ps.
/var/log/messages says:
Jun 1 00:39:43 fed ntpd[7392]: Command line: /usr/local/sbin/ntpd -u ntp -g
parse_cmdline_opts splits the ntp:ntp into user and group by smashing, in
place, the : to '\0'
I'm guessing that somebody knows how long each argument string is and is
translating non-printable characters into a space.
--
These are my opinions. I hate spam.
More information about the devel
mailing list