summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-03-24 18:14:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:52 -0500
commiteca13022ef78237f915c8fec1ecbe676b1c86ae3 (patch)
tree8b317d905b3c1496277f4ada32fbcf1251cffebb /source3
parent643157ff5ac13b15a4b501b00ffdca5fced0e7e9 (diff)
downloadsamba-eca13022ef78237f915c8fec1ecbe676b1c86ae3.tar.gz
samba-eca13022ef78237f915c8fec1ecbe676b1c86ae3.tar.bz2
samba-eca13022ef78237f915c8fec1ecbe676b1c86ae3.zip
r21960: Fix bugs 4463,4464,4465,4466. Thanks Jason :-)
(This used to be commit a2e27c443101a59ef3429a55e049af3ebd5ec1f2)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_tdb.c13
-rw-r--r--source3/librpc/ndr/ndr_sec_helper.c8
-rw-r--r--source3/librpc/ndr/sid.c2
-rw-r--r--source3/smbd/msdfs.c2
4 files changed, 5 insertions, 20 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c
index b559f589dc..9e911a653c 100644
--- a/source3/lib/util_tdb.c
+++ b/source3/lib/util_tdb.c
@@ -25,18 +25,6 @@
#undef calloc
#undef strdup
-/***************************************************************
- Allow a caller to set a "alarm" flag that tdb can check to abort
- a blocking lock on SIGALRM.
-***************************************************************/
-
-static sig_atomic_t *palarm_fired;
-
-static void tdb_set_lock_alarm(sig_atomic_t *palarm)
-{
- palarm_fired = palarm;
-}
-
/* these are little tdb utility functions that are meant to make
dealing with a tdb database a little less cumbersome in Samba */
@@ -77,7 +65,6 @@ static int tdb_chainlock_with_timeout_internal( TDB_CONTEXT *tdb, TDB_DATA key,
/* Allow tdb_chainlock to be interrupted by an alarm. */
int ret;
gotalarm = 0;
- tdb_set_lock_alarm(CONST_DISCARD(sig_atomic_t *, &gotalarm));
if (timeout) {
CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
diff --git a/source3/librpc/ndr/ndr_sec_helper.c b/source3/librpc/ndr/ndr_sec_helper.c
index 944b172d6c..46dd5d5580 100644
--- a/source3/librpc/ndr/ndr_sec_helper.c
+++ b/source3/librpc/ndr/ndr_sec_helper.c
@@ -130,7 +130,7 @@ static NTSTATUS ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags,
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
- *r = v;
+ *r = (enum security_ace_type)v;
return NT_STATUS_OK;
}
@@ -559,7 +559,7 @@ static NTSTATUS ndr_pull_security_acl_revision(struct ndr_pull *ndr, int ndr_fla
{
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
- *r = v;
+ *r = (enum security_acl_revision)v;
return NT_STATUS_OK;
}
@@ -603,7 +603,7 @@ NTSTATUS ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct secur
NDR_CHECK(ndr_pull_security_acl_revision(ndr, NDR_SCALARS, &r->revision));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces));
- if (r->num_aces < 0 || r->num_aces > 1000) {
+ if (r->num_aces > 1000) { /* num_aces is unsigned */
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->aces, r->num_aces);
@@ -657,7 +657,7 @@ static NTSTATUS ndr_pull_security_descriptor_revision(struct ndr_pull *ndr, int
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
- *r = v;
+ *r = (enum security_descriptor_revision)v;
return NT_STATUS_OK;
}
diff --git a/source3/librpc/ndr/sid.c b/source3/librpc/ndr/sid.c
index 0a9ddb883b..61790b3630 100644
--- a/source3/librpc/ndr/sid.c
+++ b/source3/librpc/ndr/sid.c
@@ -211,7 +211,7 @@ NTSTATUS ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_d
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
- if (r->sd_size < 0 || r->sd_size > 0x40000) {
+ if (r->sd_size > 0x40000) { /* sd_size is unsigned */
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 13c44e9420..8f85b90fdc 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -242,13 +242,11 @@ static BOOL parse_msdfs_symlink(TALLOC_CTX *ctx,
int *refcount)
{
pstring temp;
- char *prot;
char *alt_path[MAX_REFERRAL_COUNT];
int count = 0, i;
struct referral *reflist;
pstrcpy(temp,target);
- prot = strtok(temp,":");
/* parse out the alternate paths */
while((count<MAX_REFERRAL_COUNT) &&