[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-2507-gc4cab9e
Volker Lendecke
vl at samba.org
Sat Feb 23 10:33:24 GMT 2008
The branch, v3-2-test has been updated
via c4cab9e1c1f4975d970665f85838b2dea023d5fc (commit)
via ac027a9b2e84d319f961ac0e84654a0e48920138 (commit)
via 49da21c03a1a5801fba4b12837cccf2887e0d8f0 (commit)
via d34701d49cf5b30f5b9963dab5643b4b62704413 (commit)
via d993b4c3cea6ead74ff1e031ee9a42f2aa39a9f1 (commit)
via b8aaa9a69fd6217ce0387ef8e84f316706186d70 (commit)
from d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a (commit)
http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit c4cab9e1c1f4975d970665f85838b2dea023d5fc
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 23 10:52:12 2008 +0100
Fix a C++ warning
commit ac027a9b2e84d319f961ac0e84654a0e48920138
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 23 10:50:12 2008 +0100
Fix a C++ warning
commit 49da21c03a1a5801fba4b12837cccf2887e0d8f0
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 23 10:49:00 2008 +0100
Check return value of pipe(2)
commit d34701d49cf5b30f5b9963dab5643b4b62704413
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 23 10:47:18 2008 +0100
Check return value of dup(2)
commit d993b4c3cea6ead74ff1e031ee9a42f2aa39a9f1
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 23 10:43:58 2008 +0100
Fix a C++ warning
commit b8aaa9a69fd6217ce0387ef8e84f316706186d70
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 23 10:42:43 2008 +0100
Check the return value of fgets
-----------------------------------------------------------------------
Summary of changes:
source/lib/replace/getpass.c | 5 ++++-
source/lib/select.c | 3 ++-
source/lib/sock_exec.c | 8 ++++++--
source/libsmb/samlogon_cache.c | 3 ++-
source/nsswitch/libwbclient/wbc_pam.c | 2 +-
source/utils/smbcontrol.c | 2 +-
6 files changed, 16 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c
index d91d029..57e28eb 100644
--- a/source/lib/replace/getpass.c
+++ b/source/lib/replace/getpass.c
@@ -185,7 +185,10 @@ char *rep_getpass(const char *prompt)
buf[0] = 0;
if (!gotintr) {
in_fd = fileno(in);
- fgets(buf, bufsize, in);
+ if (fgets(buf, bufsize, in) == NULL) {
+ buf[0] = 0;
+ return buf;
+ }
}
nread = strlen(buf);
if (nread) {
diff --git a/source/lib/select.c b/source/lib/select.c
index d5e4ba6..c3da6a9 100644
--- a/source/lib/select.c
+++ b/source/lib/select.c
@@ -58,7 +58,8 @@ int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, s
fd_set *readfds2, readfds_buf;
if (initialised != sys_getpid()) {
- pipe(select_pipe);
+ if (pipe(select_pipe) == -1)
+ smb_panic("Could not create select pipe");
/*
* These next two lines seem to fix a bug with the Linux
diff --git a/source/lib/sock_exec.c b/source/lib/sock_exec.c
index 203d7e9..278a174 100644
--- a/source/lib/sock_exec.c
+++ b/source/lib/sock_exec.c
@@ -105,8 +105,12 @@ int sock_exec(const char *prog)
close(fd[0]);
close(0);
close(1);
- dup(fd[1]);
- dup(fd[1]);
+ if (dup(fd[1]) == -1) {
+ exit(1);
+ }
+ if (dup(fd[1]) == -1) {
+ exit(1);
+ }
exit(system(prog));
}
close(fd[1]);
diff --git a/source/libsmb/samlogon_cache.c b/source/libsmb/samlogon_cache.c
index e2a4b38..3cc0dcf 100644
--- a/source/libsmb/samlogon_cache.c
+++ b/source/libsmb/samlogon_cache.c
@@ -228,7 +228,8 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const DOM_SID *
goto done;
}
- info3 = talloc_memdup(mem_ctx, &r.info3, sizeof(r.info3));
+ info3 = (struct netr_SamInfo3 *)talloc_memdup(mem_ctx, &r.info3,
+ sizeof(r.info3));
done:
SAFE_FREE(data.dptr);
diff --git a/source/nsswitch/libwbclient/wbc_pam.c b/source/nsswitch/libwbclient/wbc_pam.c
index 9b8a913..1164ab1 100644
--- a/source/nsswitch/libwbclient/wbc_pam.c
+++ b/source/nsswitch/libwbclient/wbc_pam.c
@@ -136,7 +136,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx,
0);
sn++;
- p = resp->extra_data.data;
+ p = (char *)resp->extra_data.data;
if (!p) {
wbc_status = WBC_INVALID_RESPONSE;
BAIL_ON_WBC_ERROR(wbc_status);
diff --git a/source/utils/smbcontrol.c b/source/utils/smbcontrol.c
index 76036bf..db2eefe 100644
--- a/source/utils/smbcontrol.c
+++ b/source/utils/smbcontrol.c
@@ -1035,7 +1035,7 @@ static bool do_winbind_dump_domain_list(struct messaging_context *msg_ctx,
print_pid_string_cb);
buf_len = sizeof(myid)+domain_len;
- buf = SMB_MALLOC(buf_len);
+ buf = SMB_MALLOC_ARRAY(uint8_t, buf_len);
if (!buf) {
return false;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list