Write a program (similar to logger(1)) that uses syslog(3) to write arbitrary messages to the system log
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a program (similar to logger(1)) that uses syslog(3) to write arbitrary messages to the system log file. As well as accepting a single command-line argument containing the message to be logged, the program should permit an option to specify the level of the message.
Log in as a normal, unprivileged user, create an executable file (or copy an existing file such as /bin/sleep), and enable the set-user-ID permission bit on that file (chmod u+s). Try modifying the file (e.g., cat >> file). What happens to the file permissions as a result (ls l)? Why does this happen?
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date: