+2007-12-27 Nicolas François <nicolas.francois@centraliens.net>
+
+ Merge Debian's patch 462_warn_to_edit_shadow
+ * NEW, src/vipw.c: Recommend editing the shadowed (resp. regular) file
+ if the regular (resp. shadowed) file was edited.
+
2007-12-26 Nicolas François <nicolas.francois@centraliens.net>
Merge Debian's patch 451_login_PATH
- login
* Use PATH and SUPATH to set the PATH environment variable, even when
support for PAM is enabled.
+- vipw/vigr
+ * Recommend editing the shadowed (resp. regular) file if the regular (resp.
+ shadowed) file was edited.
shadow-4.0.18.2 -> shadow-4.1.0 09-12-2008
#include "pwio.h"
#include "sgroupio.h"
#include "shadowio.h"
+
+#define MSG_WARN_EDIT_OTHER_FILE _( \
+ "You have modified %s.\n"\
+ "You may need to modify %s for consistency.\n"\
+ "Please use the command `%s' to do so.\n")
+
/*
* Global variables
*/
}
if (do_vipw) {
- if (editshadow)
+ if (editshadow) {
vipwedit (SHADOW_FILE, spw_lock, spw_unlock);
- else
+ printf (MSG_WARN_EDIT_OTHER_FILE,
+ SHADOW_FILE,
+ PASSWD_FILE,
+ "vipw");
+ } else {
vipwedit (PASSWD_FILE, pw_lock, pw_unlock);
+ if (spw_file_present ()) {
+ printf (MSG_WARN_EDIT_OTHER_FILE,
+ PASSWD_FILE,
+ SHADOW_FILE,
+ "vipw -s");
+ }
+ }
} else {
#ifdef SHADOWGRP
- if (editshadow)
+ if (editshadow) {
vipwedit (SGROUP_FILE, sgr_lock, sgr_unlock);
- else
+ printf (MSG_WARN_EDIT_OTHER_FILE,
+ SGROUP_FILE,
+ GROUP_FILE,
+ "vigr");
+ } else {
#endif
vipwedit (GROUP_FILE, gr_lock, gr_unlock);
+#ifdef SHADOWGRP
+ if (sgr_file_present ()) {
+ printf (MSG_WARN_EDIT_OTHER_FILE,
+ GROUP_FILE,
+ SGROUP_FILE,
+ "vigr -s");
+ }
+#endif
+ }
}
nscd_flush_cache ("passwd");