s3:winbind: No point in using strequal to detect a 0-length string
authorVolker Lendecke <vl@samba.org>
Sat, 3 Oct 2009 15:11:43 +0000 (17:11 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 3 Oct 2009 22:14:01 +0000 (00:14 +0200)
source3/winbindd/winbindd_user.c

index 7af2d6d20246dc85b5278d6994fd0c518fcf52e5..b709f4c2650ccd80d43534baa8fd9f544ca045a7 100644 (file)
@@ -46,10 +46,10 @@ bool fillup_pw_field(const char *lp_template,
           been set in the nss_info backend), then use that.
           Otherwise use the template value passed in. */
 
-       if ( in && !strequal(in,"") && lp_security() == SEC_ADS ) {
+       if ((in != NULL) && (in[0] != '\0') && (lp_security() == SEC_ADS)) {
                templ = talloc_sub_specified(talloc_tos(), in,
                                             username, domname,
-                                    uid, gid);
+                                            uid, gid);
        } else {
                templ = talloc_sub_specified(talloc_tos(), lp_template,
                                             username, domname,