Am Fr, den 29.07.2005 schrieb Berna Massingill um 21:53:
>> > > hwclock --show | cat
>> > >
>> > > Does that help?
It did for me (newly-installed FC4 system on Dell Dimension,
hwclock from util-linux-2.12p-9.5).
I notice also that:
(*) hwclock produces output if run from one of the virtual text
consoles, but not if run from an xterm (unless piped to another
command, as you describe above).
(*) /sbin/hwclock does not produce output, but if I copy /sbin/hwclock
to, say, /root/hwclock, /root/hwclock produces output.
(*) If run as /sbin/hwclock, strace output indicates that the program
makes a call to ioctl, which works in a text console but not in an
xterm. If run as /root/hwclock, it doesn't make that call, and all
is well.
Interesting. Maybe one of the SELinux gurus is willing to jump in an
enlighten us mortals.
>> > No change. Why do you think it would?
I'm interested in the explanation as well -- why piping the output
to another command makes a difference. A colleague also says "ask
him whether he found this by accident or whether he knew it would
work because of some deep understanding ...." So -- ?
Fair question. I "know" it from
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=150153
>>
http://fedora.redhat.com/docs/release-notes/fc4/errata/#sn-overview
>>
>> hwclock is in the list of daemons covered by the targeted policy. This
>> means hwclock may or may not have control over the terminal.
Would I be right in guessing that this explains why putting the
executable in a different directory changes the results??
>> Though it
>> seems this issue is a different one (on the German speaking Fedora list
>> the cat pipe helped recently[1]).
>>
>> Alexander
>>
>> [1]
>>
https://www.redhat.com/archives/fedora-de-list/2005-June/msg00109.html
If only I read German!
Should have been just a reference, as the thread too shows a strace
output.
-- blm
Alexander
--
Alexander Dalloz | Enger, Germany | GPG
http://pgp.mit.edu 0xB366A773
legal statement:
http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp
Serendipity 23:36:56 up 14 days, 4:09, load average: 0.12, 0.15, 0.17