summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-15 11:16:26 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-15 11:16:26 +0000
commitb0b28531c8cd76d3fcd95da08389d8a4d2e631a3 (patch)
treef6a31e883573fc26a93e6bc0529d36eefe734eae /source3
parente90b65284812aaa5ff9e9935ce9bbad7791cbbcd (diff)
downloadsamba-b0b28531c8cd76d3fcd95da08389d8a4d2e631a3.tar.gz
samba-b0b28531c8cd76d3fcd95da08389d8a4d2e631a3.tar.bz2
samba-b0b28531c8cd76d3fcd95da08389d8a4d2e631a3.zip
more bug updates from head
(This used to be commit 8b769bf5bbbe54b1a39fd85cc24db09c1ab7faab)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cli_wkssvc.c3
-rw-r--r--source3/libsmb/cliconnect.c5
-rw-r--r--source3/nsswitch/winbind_nss.c8
-rw-r--r--source3/rpc_parse/parse_sec.c4
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c2
-rw-r--r--source3/smbd/lanman.c2
-rw-r--r--source3/wrepld/parser.c2
7 files changed, 9 insertions, 17 deletions
diff --git a/source3/libsmb/cli_wkssvc.c b/source3/libsmb/cli_wkssvc.c
index 756ff61e5b..97b948bf62 100644
--- a/source3/libsmb/cli_wkssvc.c
+++ b/source3/libsmb/cli_wkssvc.c
@@ -40,7 +40,6 @@ NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
prs_struct rbuf;
WKS_Q_QUERY_INFO q_o;
WKS_R_QUERY_INFO r_o;
- NTSTATUS nt_status;
if (cli == NULL || wks100 == NULL)
return NT_STATUS_UNSUCCESSFUL;
@@ -89,6 +88,6 @@ NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* do clean up */
prs_mem_free(&rbuf);
- return nt_status;
+ return NT_STATUS_OK;
}
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index f0b02b97b0..472db69fd0 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1119,11 +1119,6 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli,
struct in_addr ip;
extern pstring global_myname;
- if (!output_cli) {
- DEBUG(0, ("output_cli is NULL!?!"));
- SMB_ASSERT("output_cli for cli_full_connection was NULL.\n");
- }
-
if (!my_name)
my_name = global_myname;
diff --git a/source3/nsswitch/winbind_nss.c b/source3/nsswitch/winbind_nss.c
index 5dc3d32279..594b5fbadb 100644
--- a/source3/nsswitch/winbind_nss.c
+++ b/source3/nsswitch/winbind_nss.c
@@ -593,7 +593,7 @@ BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize)
static NSS_STATUS fill_pwent(struct passwd *result,
struct winbindd_pw *pw,
- char **buffer, int *buflen)
+ char **buffer, size_t *buflen)
{
/* User name */
@@ -678,8 +678,8 @@ static NSS_STATUS fill_pwent(struct passwd *result,
the static data passed to us by libc to put strings and stuff in.
Return NSS_STATUS_TRYAGAIN if we run out of memory. */
-static int fill_grent(struct group *result, struct winbindd_gr *gr,
- char *gr_mem, char **buffer, int *buflen)
+static NSS_STATUS fill_grent(struct group *result, struct winbindd_gr *gr,
+ char *gr_mem, char **buffer, size_t *buflen)
{
fstring name;
int i;
@@ -722,7 +722,7 @@ static int fill_grent(struct group *result, struct winbindd_gr *gr,
/* this next value is a pointer to a pointer so let's align it */
/* Calculate number of extra bytes needed to align on pointer size boundry */
- if ((i = (int)*buffer % sizeof(char*)) != 0)
+ if ((i = (unsigned long)(*buffer) % sizeof(char*)) != 0)
i = sizeof(char*) - i;
if ((tst = get_static(buffer, buflen, ((gr->num_gr_mem + 1) *
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index 56eaf4c5b5..cec37348b8 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -157,7 +157,7 @@ BOOL sec_io_ace(char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
adds new SID with its permissions to ACE list
********************************************************************/
-NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, size_t *num, DOM_SID *sid, uint32 mask)
+NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask)
{
int i = 0;
@@ -165,7 +165,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, size_t *n
*num += 1;
- if((new[0] = (SEC_ACE *) talloc_zero(ctx, *num * sizeof(SEC_ACE))) == 0)
+ if((new[0] = (SEC_ACE *) talloc_zero(ctx, (*num) * sizeof(SEC_ACE))) == 0)
return NT_STATUS_NO_MEMORY;
for (i = 0; i < *num - 1; i ++)
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index b5f6bd2f07..202e869d35 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -964,8 +964,6 @@ static WERROR init_srv_file_info_ctr(pipes_struct *p, SRV_FILE_INFO_CTR *ctr,
ctr->switch_value = switch_value;
ctr->num_entries = *total_entries - *resume_hnd;
- if (ctr->num_entries < 0)
- ctr->num_entries = 0;
ctr->num_entries2 = ctr->num_entries;
switch (switch_value) {
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 217bb6a613..996a17e932 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1778,7 +1778,7 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid, char *param,c
return False;
/* get list of domain groups SID_DOMAIN_GRP=2 */
- if(!enum_group_mapping(2 , &group_list, &num_entries, False, False)) {
+ if(!enum_group_mapping(SID_NAME_DOM_GRP , &group_list, &num_entries, False, False)) {
DEBUG(3,("api_RNetGroupEnum:failed to get group list"));
return False;
}
diff --git a/source3/wrepld/parser.c b/source3/wrepld/parser.c
index f5b9be6727..b619cb0cef 100644
--- a/source3/wrepld/parser.c
+++ b/source3/wrepld/parser.c
@@ -96,7 +96,7 @@ static void decode_wins_name(struct BUFFER *outbuf, WINS_NAME *wins_name)
wins_name->name_len=RIVAL(outbuf->buffer, outbuf->offset);
outbuf->offset+=4;
memcpy(wins_name->name,outbuf->buffer+outbuf->offset, 15);
- wins_name->name[16]='\0';
+ wins_name->name[15]='\0';
if((p = strchr(wins_name->name,' ')) != NULL)
*p = 0;