automatically uppercase server and share names (win95 won't handle
authorAndrew Tridgell <tridge@samba.org>
Sat, 14 Nov 1998 04:16:07 +0000 (04:16 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 14 Nov 1998 04:16:07 +0000 (04:16 +0000)
lowercase share names!)
(This used to be commit dddf1d8522707b828cac466c4a9ab2807d098573)

source3/client/client.c
source3/libsmb/clientgen.c
source3/libsmb/nmblib.c

index b450ed0cf9374072a304e687c062710d0a13ff28..6d9482ff28ebda0d60cfb79c4f36f549d1a78066 100644 (file)
@@ -1639,8 +1639,6 @@ struct cli_state *do_connect(char *server, char *share)
        
        ip = ipzero;
 
-       strupper(server);
-
        make_nmb_name(&calling, global_myname, 0x0, "");
        make_nmb_name(&called , server, name_type, "");
 
@@ -1878,8 +1876,6 @@ static int do_message_op(void)
 
        ip = ipzero;
 
-       strupper(desthost);
-
        make_nmb_name(&calling, global_myname, 0x0, "");
        make_nmb_name(&called , desthost, name_type, "");
 
@@ -2048,7 +2044,6 @@ static int do_message_op(void)
                case 'M':
                        name_type = 0x03; /* messages are sent to NetBIOS name type 0x3 */
                        pstrcpy(desthost,optarg);
-                       strupper(desthost);
                        message = True;
                        break;
                case 'i':
@@ -2137,7 +2132,6 @@ static int do_message_op(void)
        }
 
        get_myname((*global_myname)?NULL:global_myname,NULL);  
-       strupper(global_myname);
 
        if(*new_name_resolve_order)
                lp_set_name_resolve_order(new_name_resolve_order);
index 81f75d2cb2a98de65f64371e056f5744a8596fa8..550f7cc391dc4d3379f748c16f7fe201459a8ea8 100644 (file)
@@ -839,6 +839,7 @@ BOOL cli_send_tconX(struct cli_state *cli,
 
        slprintf(fullshare, sizeof(fullshare)-1,
                 "\\\\%s\\%s", cli->desthost, share);
+       strupper(fullshare);
 
        set_message(cli->outbuf,4,
                    2 + strlen(fullshare) + passlen + strlen(dev),True);
index b91a2944a3e515c8ad485f8dc8aad385889a32dd..7f3bcc9642ac6fba10e19b9038b530d2425a8bf6 100644 (file)
@@ -764,12 +764,12 @@ static int build_dgram(char *buf,struct packet_struct *p)
  *******************************************************************/
 void make_nmb_name( struct nmb_name *n, const char *name, int type, const char *this_scope )
 {
-  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 );
-  strupper( n->scope );
+       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 );
+       strupper( n->scope );
 }
 
 /*******************************************************************