diff options
author | Günther Deschner <gd@samba.org> | 2007-05-02 15:44:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:51 -0500 |
commit | bdbe2a955b6c984de0fd80930ac7316f030c135a (patch) | |
tree | 394b9d4d4b7dd4df0e7a647ea8a214a4a5972a1b /source3 | |
parent | 3972121063db9b1be1cca5657d0ed3dbd37dfd81 (diff) | |
download | samba-bdbe2a955b6c984de0fd80930ac7316f030c135a.tar.gz samba-bdbe2a955b6c984de0fd80930ac7316f030c135a.tar.bz2 samba-bdbe2a955b6c984de0fd80930ac7316f030c135a.zip |
r22636: Fix logic bug.
We certainly don't want to crash winbind on each sucessfull
centry_uint{8,16,32,64} read.
Jeremy, please check :-)
Guenther
(This used to be commit bfcd10766bcac1d50f7624bbe5a72eca57b5e278)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd_cache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 47bd872f03..e1fbfe3bc2 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -221,7 +221,7 @@ static uint32 centry_uint32(struct cache_entry *centry) { uint32 ret; - if (centry_check_bytes(centry, 4)) { + if (!centry_check_bytes(centry, 4)) { smb_panic_fn("centry_uint32"); return (uint32)-1; } @@ -236,7 +236,7 @@ static uint32 centry_uint32(struct cache_entry *centry) static uint16 centry_uint16(struct cache_entry *centry) { uint16 ret; - if (centry_check_bytes(centry, 2)) { + if (!centry_check_bytes(centry, 2)) { smb_panic_fn("centry_uint16"); return (uint16)-1; } @@ -251,7 +251,7 @@ static uint16 centry_uint16(struct cache_entry *centry) static uint8 centry_uint8(struct cache_entry *centry) { uint8 ret; - if (centry_check_bytes(centry, 1)) { + if (!centry_check_bytes(centry, 1)) { smb_panic_fn("centry_uint8"); return (uint8)-1; } @@ -266,7 +266,7 @@ static uint8 centry_uint8(struct cache_entry *centry) static NTTIME centry_nttime(struct cache_entry *centry) { NTTIME ret; - if (centry_check_bytes(centry, 8)) { + if (!centry_check_bytes(centry, 8)) { smb_panic_fn("centry_nttime"); return (NTTIME)-1; } @@ -300,7 +300,7 @@ static char *centry_string(struct cache_entry *centry, TALLOC_CTX *mem_ctx) return NULL; } - if (centry_check_bytes(centry, (size_t)len)) { + if (!centry_check_bytes(centry, (size_t)len)) { smb_panic_fn("centry_string"); return NULL; } @@ -332,7 +332,7 @@ static char *centry_hash16(struct cache_entry *centry, TALLOC_CTX *mem_ctx) return NULL; } - if (centry_check_bytes(centry, 16)) { + if (!centry_check_bytes(centry, 16)) { return NULL; } |