/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* File for ldaptool routines for SASL
*/
#include <ldap.h>
#include "ldaptool-sasl.h"
#ifdef SOLARIS_LDAP_CMD
#include <locale.h>
#include "ldaptool.h"
#else
#include <sasl.h>
#endif /* SOLARIS_LDAP_CMD */
#include <stdio.h>
#ifndef SOLARIS_LDAP_CMD
#define gettext(s) s
#endif
#ifdef HAVE_SASL_OPTIONS
typedef struct {
char *mech;
char *authid;
char *username;
char *passwd;
char *realm;
void *
{
return NULL;
if (mech)
else
if (authid)
else
if (username)
else
if (realm)
else
return defaults;
}
int
int rc;
return (LDAP_PARAM_ERROR);
/* Obtain the default value */
return (rc);
/* If no default, get the new value from stdin */
return (rc);
}
}
return (LDAP_SUCCESS);
}
static int
case SASL_CB_AUTHNAME:
break;
case SASL_CB_USER:
break;
case SASL_CB_PASS:
break;
case SASL_CB_GETREALM:
break;
}
}
}
/* Clear passwd */
/* At this point defaults->passwd is not NULL */
}
return (LDAP_NO_MEMORY);
}
}
return (LDAP_SUCCESS);
}
static int
int len;
#ifdef SOLARIS_LDAP_CMD
char *tmpstr;
#endif
}
#ifdef SOLARIS_LDAP_CMD
#else
#ifdef HAVE_SNPRINTF
#else
#endif
#endif /* SOLARIS_LDAP_CMD */
/* Get the new value */
#if defined(_WIN32)
} else {
char *tmp;
}
#else
#if defined(SOLARIS)
#else
#endif
#endif
return (LDAP_UNAVAILABLE);
}
} else {
return (LDAP_UNAVAILABLE);
}
return (LDAP_NO_MEMORY);
return (LDAP_SUCCESS);
}
#endif /* HAVE_SASL_OPTIONS */