This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c | |
index 765b03a9388..d7212ad8365 100644 | |
--- a/usr.bin/rcs/ci.c | |
+++ b/usr.bin/rcs/ci.c | |
@@ -565,6 +565,10 @@ checkin_update(struct checkin_params *pb) | |
/* Strip all the write bits */ | |
pb->file->rf_mode = st.st_mode & ~(S_IWUSR|S_IWGRP|S_IWOTH); | |
+ /* Preserve the owner and group */ | |
+ pb->file->rf_uid = st.st_uid; |