svn commit: r287769 - stable/10/usr.sbin/pw

Baptiste Daroussin bapt at FreeBSD.org
Mon Sep 14 05:37:33 UTC 2015


Author: bapt
Date: Mon Sep 14 05:37:32 2015
New Revision: 287769
URL: https://svnweb.freebsd.org/changeset/base/287769

Log:
  MFC: r287701
  
  Regression: fix pw usermod -d
  
  Mark the user has having been edited if -d option is passed to usermod and
  so the request change of home directory actually happen
  
  PR:		203052
  Reported by:	lenzi.sergio at gmail.com

Modified:
  stable/10/usr.sbin/pw/pw_user.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pw/pw_user.c
==============================================================================
--- stable/10/usr.sbin/pw/pw_user.c	Sun Sep 13 22:22:30 2015	(r287768)
+++ stable/10/usr.sbin/pw/pw_user.c	Mon Sep 14 05:37:32 2015	(r287769)
@@ -1694,6 +1694,7 @@ pw_user_mod(int argc, char **argv, char 
 
 	if (homedir && strcmp(pwd->pw_dir, homedir) != 0) {
 		pwd->pw_dir = homedir;
+		edited = true;
 		if (fstatat(conf.rootfd, pwd->pw_dir, &st, 0) == -1) {
 			if (!createhome)
 				warnx("WARNING: home `%s' does not exist",


More information about the svn-src-all mailing list