summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_sam.c4
-rw-r--r--source3/auth/auth_util.c3
-rw-r--r--source3/auth/auth_winbind.c8
-rwxr-xr-xsource3/configure13
-rw-r--r--source3/configure.in13
-rw-r--r--source3/libads/ldap.c2
-rw-r--r--source3/smbd/lanman.c4
-rw-r--r--source3/utils/net_rpc.c2
8 files changed, 31 insertions, 18 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 9fa33dccf6..02f8511d6a 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -393,6 +393,8 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
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)) {
@@ -400,8 +402,6 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
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;
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 98b15f3fb6..5696b8f2dc 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -821,9 +821,12 @@ NTSTATUS make_server_info_guest(auth_serversupplied_info **server_info)
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);
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index 10788721fd..c6a1727ebe 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -26,13 +26,7 @@
#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);
diff --git a/source3/configure b/source3/configure
index 574879adde..a881461b65 100755
--- a/source3/configure
+++ b/source3/configure
@@ -16462,9 +16462,16 @@ else
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
diff --git a/source3/configure.in b/source3/configure.in
index 167f977522..7a251fde83 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1003,9 +1003,16 @@ AC_CACHE_CHECK([whether building shared libraries actually works],
[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
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index d5cd56001b..60427323b0 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1790,8 +1790,8 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads)
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);
}
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 6a031dde6f..43b5d9e55f 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -218,7 +218,7 @@ static int package(struct pack_desc* p, ...)
{
va_list args;
int needed=0, stringneeded;
- char* str=NULL;
+ const char* str=NULL;
int is_string=0, stringused;
int32 temp;
@@ -334,7 +334,7 @@ static void PACKI(struct pack_desc* desc,char *t,int v)
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);
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 16caa8d861..d5af6e3fb8 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -2198,6 +2198,8 @@ int net_rpc_usage(int argc, const char **argv)
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");