summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-05-05 03:16:20 +0000
committerGerald Carter <jerry@samba.org>2004-05-05 03:16:20 +0000
commite0ea6ed77ea82af35912795122f1ea206e6363aa (patch)
tree92657df12a6d770bc8a15568e8e23fe472aebb39
parent0186f6771f52321df553547c78334e87e6d7d483 (diff)
downloadsamba-e0ea6ed77ea82af35912795122f1ea206e6363aa.tar.gz
r489: merging general build breakage fixes and IBM compiler fixes from 3.0
-rw-r--r--source/lib/util_sock.c12
-rw-r--r--source/lib/util_uuid.c2
-rw-r--r--source/rpc_client/cli_samr.c4
-rw-r--r--source/rpcclient/cmd_samr.c5
-rw-r--r--source/smbd/password.c6
5 files changed, 16 insertions, 13 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index 845aaa4b13a..308c2fc14be 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -33,7 +33,7 @@ static char *get_socket_addr(int fd)
{
struct sockaddr sa;
struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa);
- int length = sizeof(sa);
+ socklen_t length = sizeof(sa);
static fstring addr_buf;
fstrcpy(addr_buf,"0.0.0.0");
@@ -58,7 +58,8 @@ static char *get_socket_addr(int fd)
BOOL is_a_socket(int fd)
{
- int v,l;
+ int v;
+ socklen_t l;
l = sizeof(int);
return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
}
@@ -115,7 +116,8 @@ static const smb_socket_option socket_options[] = {
static void print_socket_options(int s)
{
- int value, vlen = 4;
+ int value;
+ socklen_t vlen = 4;
const smb_socket_option *p = &socket_options[0];
/* wrapped in if statement to prevent streams leak in SCO Openserver 5.0 */
@@ -837,7 +839,7 @@ char *client_socket_addr(void)
struct in_addr *client_inaddr(struct sockaddr *sa)
{
struct sockaddr_in *sockin = (struct sockaddr_in *) (sa);
- int length = sizeof(*sa);
+ socklen_t length = sizeof(*sa);
if (getpeername(client_fd, sa, &length) < 0) {
DEBUG(0,("getpeername failed. Error was %s\n", strerror(errno) ));
@@ -962,7 +964,7 @@ char *get_peer_addr(int fd)
{
struct sockaddr sa;
struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa);
- int length = sizeof(sa);
+ socklen_t length = sizeof(sa);
static fstring addr_buf;
fstrcpy(addr_buf,"0.0.0.0");
diff --git a/source/lib/util_uuid.c b/source/lib/util_uuid.c
index 4c35236c902..dc9bc920230 100644
--- a/source/lib/util_uuid.c
+++ b/source/lib/util_uuid.c
@@ -45,7 +45,7 @@ void smb_uuid_unpack(const UUID_FLAT in, struct uuid *uu)
memcpy(uu->node, in.info+10, 6);
}
-const struct uuid smb_uuid_unpack_static(const UUID_FLAT in)
+struct uuid smb_uuid_unpack_static(const UUID_FLAT in)
{
static struct uuid uu;
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index bcb4cb41054..86f65056897 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -2095,7 +2095,7 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Get domain password info */
NTSTATUS cli_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- uint16 *unk_0, uint16 *unk_1, uint16 *unk_2)
+ uint16 *unk_0, uint16 *unk_1)
{
prs_struct qbuf, rbuf;
SAMR_Q_GET_DOM_PWINFO q;
@@ -2134,8 +2134,6 @@ NTSTATUS cli_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
*unk_0 = r.unk_0;
if (unk_1)
*unk_1 = r.unk_1;
- if (unk_2)
- *unk_2 = r.unk_2;
}
done:
diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c
index ed06a5a4a07..6ab08e1991b 100644
--- a/source/rpcclient/cmd_samr.c
+++ b/source/rpcclient/cmd_samr.c
@@ -1470,19 +1470,18 @@ static NTSTATUS cmd_samr_get_dom_pwinfo(struct cli_state *cli,
int argc, const char **argv)
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint16 unk_0, unk_1, unk_2;
+ uint16 unk_0, unk_1;
if (argc != 1) {
printf("Usage: %s\n", argv[0]);
return NT_STATUS_OK;
}
- result = cli_samr_get_dom_pwinfo(cli, mem_ctx, &unk_0, &unk_1, &unk_2);
+ result = cli_samr_get_dom_pwinfo(cli, mem_ctx, &unk_0, &unk_1) ;
if (NT_STATUS_IS_OK(result)) {
printf("unk_0 = 0x%08x\n", unk_0);
printf("unk_1 = 0x%08x\n", unk_1);
- printf("unk_2 = 0x%08x\n", unk_2);
}
return result;
diff --git a/source/smbd/password.c b/source/smbd/password.c
index 4e5496c0ac5..141af82edc8 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -494,7 +494,11 @@ BOOL authorise_login(int snum, fstring user, DATA_BLOB password,
/* now check the list of session users */
if (!ok) {
char *auser;
- char *user_list = strdup(session_userlist);
+ char *user_list = NULL;
+
+ if ( session_userlist )
+ user_list = strdup(session_userlist);
+
if (!user_list)
return(False);