return NT_STATUS_NO_SUCH_USER;
}
+ nt_status = sam_account_ok(mem_ctx, sampass, user_info);
+
nt_status = sam_password_ok(auth_context, mem_ctx, sampass, user_info, user_sess_key);
if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
}
- nt_status = sam_account_ok(mem_ctx, sampass, user_info);
-
if (!NT_STATUS_IS_OK(nt_status)) {
pdb_free_sam(&sampass);
return nt_status;
sid_copy(&guest_sid, get_global_sam_sid());
sid_append_rid(&guest_sid, DOMAIN_USER_RID_GUEST);
+ become_root();
if (!pdb_getsampwsid(sampass, &guest_sid)) {
+ unbecome_root();
return NT_STATUS_NO_SUCH_USER;
}
+ unbecome_root();
nt_status = make_server_info_sam(server_info, sampass);
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
-/* Prototypes from common.h */
-
-NSS_STATUS winbindd_request(int req_type,
- struct winbindd_request *request,
- struct winbindd_response *response);
-
-NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response *response, NET_USER_INFO_3 *info3)
+static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response *response, NET_USER_INFO_3 *info3)
{
uint8 *info3_ndr;
size_t len = response->length - sizeof(response);
ac_cv_shlib_works=no
# try building a trivial shared library
- $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
- $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
- ac_cv_shlib_works=yes
+ if test "$PICSUFFIX" = "po"; then
+ $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
+ $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
+ ac_cv_shlib_works=yes
+ else
+ $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/tests/shlib.c &&
+ mv shlib.$PICSUFFIX shlib.po &&
+ $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
+ ac_cv_shlib_works=yes
+ fi
rm -f shlib.so shlib.po
fi
[ac_cv_shlib_works],[
ac_cv_shlib_works=no
# try building a trivial shared library
- $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
- $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
- ac_cv_shlib_works=yes
+ if test "$PICSUFFIX" = "po"; then
+ $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
+ $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
+ ac_cv_shlib_works=yes
+ else
+ $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/tests/shlib.c &&
+ mv shlib.$PICSUFFIX shlib.po &&
+ $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
+ ac_cv_shlib_works=yes
+ fi
rm -f shlib.so shlib.po
])
if test $ac_cv_shlib_works = no; then
p = strchr(ads->config.ldap_server_name, '$');
if (!p || p[1] != '@') {
talloc_destroy(ctx);
+ DEBUG(1, ("ads_server_info: returned ldap server name (%s) does not contain '$@' so was deemed invalid\n", ads->config.ldap_server_name));
SAFE_FREE(ads->config.ldap_server_name);
- DEBUG(1, ("ads_server_info: returned ldap server name did not contain '$@' so was deemed invalid\n"));
return ADS_ERROR(LDAP_DECODING_ERROR);
}
{
va_list args;
int needed=0, stringneeded;
- char* str=NULL;
+ const char* str=NULL;
int is_string=0, stringused;
int32 temp;
PACK(desc,t,v);
}
-static void PACKS(struct pack_desc* desc,char *t,char *v)
+static void PACKS(struct pack_desc* desc,const char *t,const char *v)
{
PACK(desc,t,v);
}
d_printf(" net rpc file \t\t\tto list open files\n");
d_printf(" net rpc changetrustpw \tto change the trust account password\n");
d_printf(" net rpc getsid \t\tfetch the domain sid into the local secrets.tdb\n");
+ d_printf(" net rpc vampire \t\tsyncronise an NT PDC's users and groups into the local passdb\n");
+ d_printf(" net rpc samdump \t\tdiplay an NT PDC's users, groups and other data\n");
d_printf(" net rpc trustdom \t\tto create trusting domain's account\n"
"\t\t\t\t\tor establish trust\n");
d_printf(" net rpc abortshutdown \tto abort the shutdown of a remote server\n");