Commit da6ba25b authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Preserve modification time when backing up user's current authorized

keys file.
parent 3d17e867
......@@ -340,7 +340,7 @@ if (open(AKEYS, "> $SSHDIR/")) {
fatal("Could not chown for $user: $!");
if (-e "$SSHDIR/authorized_keys") {
if (system("cp -f $SSHDIR/authorized_keys ".
if (system("cp -f -p $SSHDIR/authorized_keys ".
"$SSHDIR/authorized_keys.old")) {
fatal("Could not save authorized_keys for $user: $!");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment