Commit Graph

7 Commits

Author SHA1 Message Date
Jonas Weber ae7ccc5995 Fix SC2086 on all scripts
Relevant documentation: https://github.com/koalaman/shellcheck/wiki/SC2086

relates to: #540

This commit addresses 241 separate cases of missing quotes around
variables.
2018-10-04 19:45:22 +02:00
Philippe Grégoire 31e5c97c55
use command(1) to get executable's path 2017-08-21 10:51:55 -04:00
Philippe Grégoire 997fdd8ac4
fix typo in group entry extraction 2017-08-20 15:13:01 -04:00
Philippe Grégoire a915baa73b
__user: explore with /etc files
getent(1) is a utility available where Name Service Switch (NSS)
is available. Many modern operating systems support it, but that
may not be the case of all (e.g. embedded systems).

This commit modifies the __user type explorers to check the
traditional files instead of relying solely on the availability
of getent(1).

- Makes the group explorer use /etc/group
- Makes the passwd explorer use /etc/passwd
- Makes the shadow explorer use /etc/shadow

Implementation note

"getent shadow" does not support querying an entry using a uid
since it does not store that information. Since the shadow explorer
uses __object_id, the passwd explorer does not check if __object_id
matches an entry by uid. This behavior ensures consistent, transparent
behavior of the type. The group explorer, on the other hand, handles
group names and uids; like always.
2017-08-20 12:10:54 -04:00
Jonathan A. Kollasch cdd5f380c4 use passwd database instead of shadow database on NetBSD too 2015-10-15 10:44:22 -05:00
og 6a455be63a openbsd and freebsd both use the 'passwd' database 2014-03-02 17:34:36 -07:00
Nico Schottelius 63573a9797 make package_data work
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-29 22:50:27 +01:00