~ubuntu-branches/ubuntu/trusty/openldap/trusty-updates

« back to all changes in this revision

Viewing changes to clients/tools/ldappasswd.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-01-23 10:01:13 UTC
  • mfrom: (1.3.4)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: package-import@ubuntu.com-20120123100113-z3mg83hvuplv9lyj
Tags: upstream-2.4.28
ImportĀ upstreamĀ versionĀ 2.4.28

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ldappasswd -- a tool for change LDAP passwords */
2
 
/* $OpenLDAP: pkg/ldap/clients/tools/ldappasswd.c,v 1.136.2.12 2011/01/04 23:49:28 kurt Exp $ */
 
2
/* $OpenLDAP$ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
5
 * Copyright 1998-2011 The OpenLDAP Foundation.
313
313
                struct timeval  tv;
314
314
 
315
315
                if ( tool_check_abandon( ld, id ) ) {
316
 
                        return LDAP_CANCELLED;
 
316
                        tool_exit( ld, LDAP_CANCELLED );
317
317
                }
318
318
 
319
319
                tv.tv_sec = 0;
322
322
                rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
323
323
                if ( rc < 0 ) {
324
324
                        tool_perror( "ldap_result", rc, NULL, NULL, NULL, NULL );
325
 
                        return rc;
 
325
                        tool_exit( ld, rc );
326
326
                }
327
327
 
328
328
                if ( rc != 0 ) {
374
374
        }
375
375
 
376
376
        if( verbose || code != LDAP_SUCCESS ||
377
 
                matcheddn || text || refs || ctrls )
 
377
                ( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls )
378
378
        {
379
379
                printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );
380
380
 
409
409
 
410
410
done:
411
411
        /* disconnect from server */
412
 
        if ( ld )
413
 
                tool_unbind( ld ); 
414
 
        tool_destroy();
415
 
        return rc;
 
412
        tool_exit( ld, rc ); 
416
413
}