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.ser...@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",
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to