patch-migrate_passwd_pl 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. $OpenBSD: patch-migrate_passwd_pl,v 1.2 2012/03/23 11:17:02 sthen Exp $
  2. Our master.passwd differs from linux shadow, reflect this.
  3. --- migrate_passwd.pl.orig Wed Jan 25 05:18:16 2006
  4. +++ migrate_passwd.pl Fri Mar 2 23:42:40 2012
  5. @@ -32,7 +32,7 @@
  6. # SUCH DAMAGE.
  7. #
  8. #
  9. -# Password migration tool. Migrates /etc/shadow as well, if it exists.
  10. +# Password migration tool. Migrates /etc/master.passwd as well, if it exists.
  11. #
  12. # Thanks to Peter Jacob Slot <peter@vision.auk.dk>.
  13. #
  14. @@ -185,7 +185,7 @@ if (OUTFILE != STDOUT) { close(OUTFILE); }
  15. sub read_shadow_file
  16. {
  17. - open(SHADOW, "/etc/shadow") || return;
  18. + open(SHADOW, "/etc/master.passwd") || return;
  19. while(<SHADOW>) {
  20. chop;
  21. ($shadowUser) = split(/:/, $_);
  22. @@ -196,7 +196,7 @@ sub read_shadow_file
  23. sub dump_shadow_attributes
  24. {
  25. - local($HANDLE, $user, $pwd, $lastchg, $min, $max, $warn, $inactive, $expire, $flag) = @_;
  26. + local($HANDLE, $user, $pwd, $uid, $gid, $class, $max, $expire, $gecos, $home, $shell) = @_;
  27. print $HANDLE "objectClass: shadowAccount\n";
  28. if ($pwd) {