Merge branch 'master' of ssh://git.samba.org/data/git/samba into master-devel
authorAndrew Bartlett <abartlet@samba.org>
Thu, 23 Oct 2008 01:56:30 +0000 (12:56 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 23 Oct 2008 01:56:30 +0000 (12:56 +1100)
source3/lib/netapi/group.c
source3/libsmb/clispnego.c
source3/rpc_server/srv_samr_nt.c
source4/torture/rpc/dssync.c

index 8dba4b88380a59fdda6dc062d6cb3cb2c24b6bd0..95c012a7f6d09306f6a0e64e0776460300b618f6 100644 (file)
@@ -1243,7 +1243,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
                goto done;
        }
 
-       if (r->out.resume_handle) {
+       if (r->out.resume_handle && info.info3.count > 0) {
                *r->out.resume_handle =
                        info.info3.entries[info.info3.count-1].idx;
        }
index fd312a4c0a7688d24122b195f13eefeb138c0f07..fb95d719259a5f2e54d68f11d43d2eb3ad636552 100644 (file)
@@ -152,7 +152,7 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob,
        for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
                const char *oid_str = NULL;
                asn1_read_OID(data,NULL,&oid_str);
-               OIDs[i] = oid_str;
+               OIDs[i] = CONST_DISCARD(char *, oid_str);
        }
        OIDs[i] = NULL;
        asn1_end_tag(data);
@@ -257,7 +257,7 @@ bool parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *se
        for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
                const char *oid_str = NULL;
                asn1_read_OID(data,NULL,&oid_str);
-               OIDs[i] = oid_str;
+               OIDs[i] = CONST_DISCARD(char *, oid_str);
        }
        OIDs[i] = NULL;
        asn1_end_tag(data);
index 221ad2914473d5c17d80733f980705c5bb0ad584..36be832a75ca03df88e84f83dd3ca3a2ec624dc0 100644 (file)
@@ -871,7 +871,7 @@ NTSTATUS _samr_QuerySecurity(pipes_struct *p,
        status = access_check_samr_function(acc_granted,
                                            STD_RIGHT_READ_CONTROL_ACCESS,
                                            "_samr_QuerySecurity");
-       if (NT_STATUS_IS_OK(status)) {
+       if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
 
@@ -4908,6 +4908,8 @@ NTSTATUS _samr_DeleteUser(pipes_struct *p,
        if (!close_policy_hnd(p, r->in.user_handle))
                return NT_STATUS_OBJECT_NAME_INVALID;
 
+       ZERO_STRUCTP(r->out.user_handle);
+
        force_flush_samr_cache(disp_info);
 
        return NT_STATUS_OK;
index bee2658816b2fa14614da16c6fa1965087855810..847b32827b8dd2739eb5d285e65f51f2132540ad 100644 (file)
@@ -825,7 +825,7 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
        struct drsuapi_DsGetNT4ChangeLog r;
        union drsuapi_DsGetNT4ChangeLogRequest req;
        union drsuapi_DsGetNT4ChangeLogInfo info;
-       int32_t level_out = 0;
+       uint32_t level_out = 0;
        struct GUID null_guid;
        struct dom_sid null_sid;
        DATA_BLOB cookie;