diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-29 22:16:31 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2007-12-29 23:12:51 +0100 |
commit | a59280792cab616f5b269960ab68bc44ccc1fd38 (patch) | |
tree | a2770e3303c0ca9e788f05d83663acc0c27fcc65 /source3/winbindd | |
parent | 99bd615a80e8f983d386e260e747db102ec38cf3 (diff) | |
download | samba-a59280792cab616f5b269960ab68bc44ccc1fd38.tar.gz samba-a59280792cab616f5b269960ab68bc44ccc1fd38.tar.bz2 samba-a59280792cab616f5b269960ab68bc44ccc1fd38.zip |
Remove tiny code duplication
sid_size did the same as ndr_size_dom_sid
(This used to be commit 8aec5d09ba023413bd8ecbdfbc7d23904df94389)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 7fb42a6dca..6a4f531c5f 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -978,6 +978,7 @@ static bool send_getdc_request(struct sockaddr_storage *dc_ss, char *p; fstring my_acct_name; fstring my_mailslot; + size_t sid_size; if (dc_ss->ss_family != AF_INET) { return false; @@ -1019,7 +1020,9 @@ static bool send_getdc_request(struct sockaddr_storage *dc_ss, SIVAL(p, 0, 0x80); p+=4; - SIVAL(p, 0, sid_size(sid)); + sid_size = ndr_size_dom_sid(sid, 0); + + SIVAL(p, 0, sid_size); p+=4; p = ALIGN4(p, outbuf); @@ -1027,12 +1030,12 @@ static bool send_getdc_request(struct sockaddr_storage *dc_ss, return false; } - sid_linearize(p, sid_size(sid), sid); - if (sid_size(sid) + 8 > sizeof(outbuf) - PTR_DIFF(p, outbuf)) { + sid_linearize(p, sid_size, sid); + if (sid_size + 8 > sizeof(outbuf) - PTR_DIFF(p, outbuf)) { return false; } - p += sid_size(sid); + p += sid_size; SIVAL(p, 0, 1); SSVAL(p, 4, 0xffff); |