diff options
author | Christopher R. Hertel <crh@samba.org> | 1998-07-14 01:52:09 +0000 |
---|---|---|
committer | Christopher R. Hertel <crh@samba.org> | 1998-07-14 01:52:09 +0000 |
commit | a5ddf0881e2410b7d4d8f1a389785e4db28d989e (patch) | |
tree | 7f6ba93997ac2e9e9dc3ad4db90392a70b816121 | |
parent | ebad4278b72289f10ce7afa72a137f5e3e998b01 (diff) | |
download | samba-a5ddf0881e2410b7d4d8f1a389785e4db28d989e.tar.gz samba-a5ddf0881e2410b7d4d8f1a389785e4db28d989e.tar.bz2 samba-a5ddf0881e2410b7d4d8f1a389785e4db28d989e.zip |
Added strupper() function call to up-case the scope field in the
make_nmb_name() function. Database lookups (eg. gdbm) will often use
byte-by-byte comparisons, so it is important that the case and padding
are correct.
Chris -)-----
(This used to be commit d64ca4250ff0df4ceffe49b7d462df699a6981b4)
-rw-r--r-- | source3/libsmb/nmblib.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c index 89b0fa7a92..66f85d40fd 100644 --- a/source3/libsmb/nmblib.c +++ b/source3/libsmb/nmblib.c @@ -759,14 +759,15 @@ static int build_dgram(char *buf,struct packet_struct *p) /******************************************************************* build a nmb name - ******************************************************************/ -void make_nmb_name(struct nmb_name *n,char *name,int type,char *this_scope) + *******************************************************************/ +void make_nmb_name( struct nmb_name *n, char *name, int type, char *this_scope ) { - memset((char *)n, '\0', sizeof(struct nmb_name)); - StrnCpy(n->name,name,15); - strupper(n->name); + memset( (char *)n, '\0', sizeof(struct nmb_name) ); + StrnCpy( n->name, name, 15 ); + strupper( n->name ); n->name_type = (unsigned int)type & 0xFF; - StrnCpy(n->scope,this_scope,63); + StrnCpy( n->scope, this_scope, 63 ); + strupper( n->scope ); } /******************************************************************* |