#include "includes.h"
#include "winbind_client.h"
#include "libwbclient/wbclient.h"
-#include "lib/popt/popt.h"
#include "../libcli/auth/libcli_auth.h"
#include "lib/cmdline/popt_common.h"
+#include "lib/afs/afs_settoken.h"
#ifdef DBGC_CLASS
#undef DBGC_CLASS
dcname ? dcname : "",
WBC_ERROR_IS_OK(wbc_status) ? "succeeded" : "failed");
+ wbcFreeMemory(dcname);
if (wbc_status == WBC_ERR_AUTH_ERROR) {
d_fprintf(stderr, "error code was %s (0x%x)\n",
error->nt_string, error->nt_status);
}
wbc_status = wbcLookupRids(&dinfo->sid, num_rids, rids,
- (const char **)&domain_name, &names, &types);
+ &p, &names, &types);
if (!WBC_ERROR_IS_OK(wbc_status)) {
d_printf("winbind_lookup_rids failed: %s\n",
wbcErrorString(wbc_status));
goto done;
}
+ domain_name = discard_const_p(char, p);
d_printf("Domain: %s\n", domain_name);
for (i=0; i<num_rids; i++) {
OPT_KRB5CCNAME
};
-int main(int argc, char **argv, char **envp)
+int main(int argc, const char **argv, char **envp)
{
int opt;
TALLOC_CTX *frame = talloc_stackframe();
/* Parse options */
- pc = poptGetContext("wbinfo", argc, (const char **)argv,
+ pc = poptGetContext("wbinfo", argc, argv,
long_options, 0);
/* Parse command line options */