SXID(5)

๐Ÿ’– SXID(5) โ€” the file formats manual, but make it a group chat ๐Ÿ’–

okay bestie so this is the sxid.conf page from section 5 of the manual (the file formats one, iykyk) โ€” it's giving "configuration settings for sXid" and honestly it's so much less scary than it sounds. come sit with me. ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

sxid.conf โ€” configuration settings for sXid โœจ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So this is the config file sXid reads to figure out its parameters for execution. Default location? /etc/sxid.conf. But bestie, it can be anything you want โ€” just point at it with the --config command line option for sXid. main character energy, your file your rules. ๐Ÿ’…

Options in this file go like this:

OPTION = "VALUE"
and ngl this is the part people mess up: the VALUE must be wrapped in double quotes. no quotes, no vibes, no service. ๐Ÿ˜ญ

โœจ OPTIONS โœจ

  • ALWAYS_NOTIFY โ€” if sXid doesn't find any changes, it will not send an emailโ€ฆ unless you put "yes" here. that's the whole deal. so if you're the type who needs the "no news" text, this is your moment. ๐Ÿ“ง
  • ALWAYS_ROTATE โ€” usually sXid only rotates the log files when there's a change from the last run, and honestly? that's usually best, because then all the logs actually record a change instead of just recording that the program ran. but if you want the logs rotated every single time sXid runs, changes or not, specify "yes" here. icon behavior. ๐Ÿ”„
  • EMAIL โ€” where to send the email containing the output of changes every time sXid is run. example:
EMAIL = "System Administrator <sysadmin@example.com>"
  • ENFORCE โ€” normally sXid just flags items that are suid or sgid and sitting in a FORBIDDEN directory. with this set to "yes", sXid will straight up remove the s[ug]id bit(s) on any files or directories it finds in forbidden directories, and report any changes in the email. ๐Ÿ’€
heads up: directories listed in FORBIDDEN are searched regardless of whether or not they're listed in SEARCH. however, the EXCLUDE option still applies to directories that fall under them.
  • EXCLUDE โ€” a space separated list of directories to exclude from the search. note that if a SEARCH path falls under an EXCLUDE path, it will still be searched โ€” so this is perfect for excluding a whole directory and only specifying one. example:
SEARCH  = "/usr /usr/src/linux"
EXCLUDE = "/usr/src"
  • EXTRA_LIST โ€” a file that contains a list (each on its own line) of other files sXid should monitor. obsessed with this one for files that aren't +s but relate to system integrity (tcpd, inetd, apacheโ€ฆ). example:
EXTRA_LIST = "/etc/sxid.list"
  • FORBIDDEN โ€” a space separated list of directories that are not supposed to contain any suid or sgid items. items that are suid or sgid in these directories get flagged in the email separately from the other listings, whether there are other changes or not. example:
FORBIDDEN = "/tmp /home"
  • IGNORE_DIRS โ€” ignore entries for directories in these paths. this means only files will be recorded. and yes bestie, you can effectively ignore all directory entries by setting this to "/". slay. ๐ŸŽ€
  • KEEP_LOGS โ€” a numerical value for how many log files to keep when rotating. just a number. that's it.
  • LISTALL โ€” forces a list of all entries to be included in the output. implies ALWAYS_NOTIFY. ๐Ÿ’…
  • LOG_FILE โ€” the full path of where to store the log files. these get rotated, and each rotated log gets suffixed with a digit. the directories must already exist. this is usually /var/log/sxid.log. rotated logs would look like /var/log/sxid.log.n where โ€œnโ€ is the number in the rotation. the current log has no suffix. ๐Ÿ—‚๏ธ
  • MAIL_PROG โ€” mail program. this changes the default compiled-in mailer for reports. you only need this if you've changed its location and don't want to recompile sXid. lazy girl win, no cap. ๐Ÿ“ฎ
  • SEARCH โ€” a space separated list of directories to search. sXid will use these as a starting point for its searches. example:
SEARCH = "/usr /bin /lib"

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Ben Collins <bcollins@debian.org>


๐Ÿ™ˆ REPORTING BUGS ๐Ÿ™ˆ

Timur Birsh <taem@linukz.org>


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

sxid(1)


and that's the whole page, bestie, you ate that. this one came from Debian and it's dated July 29, 2013 โ€” shoutout to the era that raised us. go forth and configure responsibly, fr fr. ๐Ÿ’œโœจ