mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
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 commit is contained in:
@ -759,14 +759,15 @@ static int build_dgram(char *buf,struct packet_struct *p)
|
|||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
build a nmb name
|
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));
|
memset( (char *)n, '\0', sizeof(struct nmb_name) );
|
||||||
StrnCpy(n->name,name,15);
|
StrnCpy( n->name, name, 15 );
|
||||||
strupper(n->name);
|
strupper( n->name );
|
||||||
n->name_type = (unsigned int)type & 0xFF;
|
n->name_type = (unsigned int)type & 0xFF;
|
||||||
StrnCpy(n->scope,this_scope,63);
|
StrnCpy( n->scope, this_scope, 63 );
|
||||||
|
strupper( n->scope );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
Reference in New Issue
Block a user