]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/tools/slapadd.c
ITS#2865 don't try to calloc 0 bytes, log an error and return instead.
[openldap] / servers / slapd / tools / slapadd.c
index 1958a4249304ab2dcbe5c6751a14dd5d4177c916..0dac6e8308a5a77b38e41ee2e2ba9441bda28919 100644 (file)
@@ -1,8 +1,26 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Portions Copyright 1998-2003 Kurt D. Zeilenga.
+ * Portions Copyright 2003 IBM Corporation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
+/* ACKNOWLEDGEMENTS:
+ * This work was initially developed by Kurt Zeilenga for inclusion
+ * in OpenLDAP Software.  Additional signficant contributors include
+ *    Jong Hyuk Choi
+ *    Pierangelo Masarati
+ */
+
 #include "portable.h"
 
 #include <stdio.h>
@@ -226,7 +244,8 @@ main( int argc, char **argv )
                        {
                                vals[0].bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ) );
                                vals[0].bv_val = uuidbuf;
-                               attr_merge( e, slap_schema.si_ad_entryUUID, vals, NULL );
+                               attr_merge_normalize_one( e,
+                                                       slap_schema.si_ad_entryUUID, vals, NULL );
                        }
 
                        if( attr_find( e->e_attrs, slap_schema.si_ad_creatorsName )