behavior of create_iolog_path(), iolog_mkdtemp() and sudo_logsrvd version 1.9.1
"Andy W." <[email protected]> Mon, 15 Jun 2020 21:52:04 -0600
| Newsgroups | gmane.comp.tools.sudo.user |
|---|---|
| Message-ID | <CAFbC2oruPJ4xyhkO9Ez6VbBGAaoy+ZVRsA78=KCv6vkmVk=E+w@mail.gmail.com> |
Hello,
I am noticing that the "XXXXXX" suffix documented in the sudo_logsrvd.conf
manual does not seem to work as advertised or I have misunderstood. I am
running sudo_logsrvd 1.9.1.
I get the same result no matter what I put into the iolog_file value of the
conf file--with or without expansions such as %{hostname} and with or
without directory components. If the value contains XXXXXX at the end, it
fails with the inappropriate ioctl error below.
Test cases:
Demonstrating with absurd iolog_file value of "this_actual_string_XXXXXX":
> # grep ^iolog_[df]i /etc/sudo_logsrvd.conf
> iolog_dir = /var/log/sudo-io/
> iolog_file = this_actual_string_XXXXXX
> # grep create_iolog /var/log/sudo_logsrvd_debug
> Jun 16 04:27:38 sudo_logsrvd[6909] unable to mkdir iolog path
> /var/log/sudo-io/this_actual_string_eEHTnR: Inappropriate ioctl for device
> @ create_iolog_path() ./iolog_writer.c:597
> # grep logsrvd /etc/sudo.conf
> Debug sudo_logsrvd /var/log/sudo_logsrvd_debug util@warn
> #
>
Same result with this (anonymised):
> # grep ^iolog_[df]i /etc/sudo_logsrvd.conf
> iolog_dir = /var/log/sudo-io/
> iolog_file = %{hostname}/%{user}/log-XXXXXXX
> # grep create_iolog /var/log/sudo_logsrvd_debug
> Jun 16 04:37:46 sudo_logsrvd[7126] unable to mkdir iolog path
> /var/log/sudo-io/mysystem/myuser/log-XBMUKde: Inappropriate ioctl for
> device @ create_iolog_path() ./iolog_writer.c:597
> #
I want the XXXXXX functionality becase I am trying to avoid the truncation
scenario mentioned in the manual:
If the path created by concatenating iolog_dir and
> iolog_file already exists, the existing I/O log file
> will be truncated and overwritten unless iolog_file
> ends in six or more Xs.
Any suggestions would be appreciated.
Best Regards,
Andrew West
____________________________________________________________
sudo-users mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-users