authmethod = -1;
- prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
+ prog = lutil_progname( "ldapcompare", argc, argv );
while (( i = getopt( argc, argv,
"Cd:D:h:H:IkKMnO:p:P:qQR:U:vw:WxX:Y:zZ")) != EOF )
#include <ac/unistd.h>
#include <ldap.h>
+#include "lutil.h"
#include "lutil_ldap.h"
#include "ldap_defaults.h"
authmethod = -1;
version = -1;
- prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
+ prog = lutil_progname( "ldapdelete", argc, argv );
while (( i = getopt( argc, argv, "cf:r"
"Cd:D:h:H:IkKMnO:p:P:QR:U:vw:WxX:Y:Z" )) != EOF )
#include <ldap.h>
+#include "lutil.h"
#include "lutil_ldap.h"
#include "ldif.h"
#include "ldap_defaults.h"
int rc, i, authmethod, version, want_bindpw, debug, manageDSAit, referrals;
int count, len;
- if (( prog = strrchr( argv[ 0 ], *LDAP_DIRSEP )) == NULL ) {
- prog = argv[ 0 ];
- } else {
- ++prog;
- }
+ prog = lutil_progname( "ldapmodify", argc, argv );
/* Print usage when no parameters */
if( argc < 2 ) usage( prog );
#include <ac/unistd.h>
#include <ldap.h>
+#include "lutil.h"
#include "lutil_ldap.h"
#include "ldap_defaults.h"
authmethod = -1;
version = -1;
- prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
+ prog = lutil_progname( "ldapmodrdn", argc, argv );
while (( i = getopt( argc, argv, "cf:rs:"
"Cd:D:h:H:IkKMnO:p:P:QR:U:vw:WxX:Y:Z" )) != EOF )
#include <ac/unistd.h>
#include <ldap.h>
-
+#include "lutil.h"
#include "lutil_ldap.h"
#include "ldap_defaults.h"
char *retoid = NULL;
struct berval *retdata = NULL;
- prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
+ prog = lutil_progname( "ldappasswd", argc, argv );
while( (i = getopt( argc, argv, "Aa:Ss:"
"Cd:D:h:H:InO:p:QR:U:vw:WxX:Y:Z" )) != EOF )
debug = verbose = not = vals2tmp = referrals = valuesReturnFilter =
attrsonly = manageDSAit = ldif = want_bindpw = 0;
+ prog = lutil_progname( "ldapsearch", argc, argv );
+
lutil_log_initialize(argc, argv);
deref = sizelimit = timelimit = version = -1;
urlize( def_urlpre );
- prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
-
while (( i = getopt( argc, argv, "Aa:b:E:F:f:Ll:S:s:T:tuz:"
"Cd:D:h:H:IkKMnO:p:P:QR:U:vw:WxX:Y:Z")) != EOF )
{
#include <ac/unistd.h>
#include <ldap.h>
-
+#include "lutil.h"
#include "lutil_ldap.h"
#include "ldap_defaults.h"
char *retoid = NULL;
struct berval *retdata = NULL;
- prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
+ prog = lutil_progname( "ldapwhoami", argc, argv );
while( (i = getopt( argc, argv, "Aa:Ss:"
"Cd:D:h:H:InO:p:QR:U:vw:WxX:Y:Z" )) != EOF )