Commit Graph

34 Commits

Author SHA1 Message Date
tom c5098dfcc5 fix [SC1117] (explicitly excaping `\n`) 2018-10-12 14:05:38 +02:00
tom c950dd1e90 quote "remote user", ensuring `user` is handled as one parameter 2018-10-12 14:05:38 +02:00
tom 5761939fa9 add new messages to man.rst 2018-10-12 14:05:38 +02:00
tom c995d08ce2 redirect stdout+stderr of `userdel`
If no mail-spoolfile exists for the user the error reporting was
visible in the cdist-run.
2018-10-12 14:05:38 +02:00
tom a1bf381370 add messaging 2018-10-12 14:05:38 +02:00
tom 409d736339 explicitly check for `absent` to handle state-typos gracefully 2018-10-12 14:05:38 +02:00
Darko Poljak 49bb041330
Merge pull request #696 from thriqon/shellcheck-party-SC2086
Fix SC2086 on all scripts
2018-10-05 10:26:53 +02:00
Jonas Weber 34b571b7d9 Fix SC2091 (execute result of condition)
For some reason, the echo|grep pattern was enclosed four times in a $()
operation. Nothing happened, since grep is always invoked with -q
(quiet, nothing printed to stdout).
2018-10-04 22:23:48 +02:00
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
tom d950ddada3 fix SC2045 (use globs instead of `ls`) 2018-10-04 16:01:45 +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
Darko Poljak 62378dc8b9 Change shebang to #!/bin/sh -e 2017-06-28 13:19:32 +02:00
kamila c4996396c6 __user type: fix for FreeBSD 2016-11-22 18:21:03 +01:00
Darko Poljak df566f4ff8 GPLv3+ relicensing. 2016-08-10 18:15:54 +02:00
Darko Poljak 0dfb4aee73 sphinx> ':manpage:' -> ':strong:' 2016-06-30 15:13:33 +02:00
Darko Poljak f98208f250 Make man pages SEE ALSO by convention. Improve docs building. 2016-06-30 12:09:07 +02:00
Darko Poljak 51c94e9e82 Restructure and fix and improve docs and manpages. 2016-06-29 07:48:34 +02:00
Darko Poljak b89077f9a5 Better sphinx manpage ext. Add custom dotman Makefile target for custom .cdist directory. 2016-06-23 16:08:59 +02:00
Darko Poljak cf32b669ff Write sphinx rst docs. 2016-05-22 17:16:03 +02: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
Daniel Heule 4e94713f07 documented all messages which I have found via grep 2014-01-17 10:27:21 +01:00
Nico Schottelius d288acbe30 Merge remote-tracking branch 'steven/issue/236'
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>

Conflicts:
	cdist/conf/type/__user/gencode-remote
2013-12-20 08:53:01 +01:00
Steven Armstrong 80fffbad11 implement messaging for __user type
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-12-19 11:21:44 +01:00
Daniel Heule e5253e0330 correct man page text of system parameter 2013-12-19 08:14:29 +01:00
Daniel Heule 7d4c11a186 reset false mode changes 2013-12-17 14:15:41 +01:00
Daniel Heule 138d26e398 extended type __user: parameter state, system, remove-home new 2013-12-17 14:13:20 +01:00
Nico Schottelius 352c7da46c quote the new value check - may contains spaces
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-04-02 09:21:01 +02:00
Arkaitz Jimenez 60f85c5b85 __user support for --create-home 2013-04-01 00:02:22 +02:00
Nico Schottelius 327a0f2844 remove --groups from __user type
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-18 23:31:19 +01:00
Nico Schottelius 80c6592ec8 add hints to related manpages
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-15 09:49:37 +01: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