]> granicus.if.org Git - shadow/commitdiff
useradd now uses link rather than rename
authorNicolas François <nicolas.francois@centraliens.net>
Sat, 20 Sep 2014 20:35:21 +0000 (22:35 +0200)
committerNicolas François <nicolas.francois@centraliens.net>
Sat, 20 Sep 2014 22:17:26 +0000 (00:17 +0200)
tests/failures/useradd/10_useradd_rename_defaults_backup_failure/data/useradd.err
tests/failures/useradd/10_useradd_rename_defaults_backup_failure/useradd.test

index 887640ceb29a006421d9f163165e160952c837c0..7ec53ac746de6f682cb4253b3a6710af5b48071c 100644 (file)
@@ -1,2 +1,2 @@
-rename FAILURE /etc/default/useradd /etc/default/useradd-
-useradd: rename: /etc/default/useradd: Input/output error
+link FAILURE /etc/default/useradd /etc/default/useradd-
+useradd: Cannot create backup file (/etc/default/useradd-): Input/output error
index da9a2bddaef5f7499d75a9d7db26efbf2f2f7466..241f727f34661791ba9190d31058eb8549d72fce 100755 (executable)
@@ -7,7 +7,7 @@ cd $(dirname $0)
 . ../../../common/config.sh
 . ../../../common/log.sh
 
-log_start "$0" "useradd reports failure to write /etc/gshadow"
+log_start "$0" "useradd reports failure to create backup /etc/default/useradd-"
 
 save_config
 
@@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
 change_config
 
 echo -n "Set default value (useradd -D -g 10)..."
-LD_PRELOAD=../../../common/rename_failure.so FAILURE_PATH=/etc/default/useradd- useradd -D -g 10 2>tmp/useradd.err && exit 1 || {
+LD_PRELOAD=../../../common/link_failure.so FAILURE_PATH=/etc/default/useradd- useradd -D -g 10 2>tmp/useradd.err && exit 1 || {
        status=$?
 }
 echo "OK"