OOps!!

I forgot to attach the diff file..
Here it is

Thanks & Regards,
Avinash Joshi
 
 
This message posted from opensolaris.org
-------------- next part --------------
--- useradd.c.org       Sun Jan 27 16:12:29 2008
+++ useradd.c   Sun Jan 27 16:26:07 2008
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -491,6 +491,10 @@
        if (mflag) {
                /* Does home dir. already exist? */
                if (stat(homedir, &statbuf) == 0) {
+                       if (statbuf.st_mode != S_IFDIR) {
+                               errmsg(M_RELPATH, homedir);
+                               exit(EX_BADARG);
+                       }
                        /* directory exists - don't try to create */
                        mflag = 0;
 

Reply via email to