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;
/* do clean up */
prs_mem_free(&rbuf);
- return nt_status;
+ return NT_STATUS_OK;
}
static NSS_STATUS fill_pwent(struct passwd *result,
struct winbindd_pw *pw,
- char **buffer, int *buflen)
+ char **buffer, size_t *buflen)
{
/* User name */
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;
/* 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) *
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;
*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 ++)
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) {
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;