fss: perform case insensitive share name lookup async_rpc_fsrvp_40t_wip
authorDavid Disseldorp <ddiss@samba.org>
Mon, 6 May 2013 14:26:16 +0000 (16:26 +0200)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 8 May 2013 10:21:38 +0000 (12:21 +0200)
GetShareMapping and DeleteShareMapping requests may be sent with a share
name that is of differing case to the one stored in the shadow copy
share mapping state. Lookup should be case-insensitive.

source3/rpc_server/fss/srv_fss_agent.c

index 9be847e849d037b2e2474c19d7df6e6ab2bc82d6..5858481154e084bd241ae104e5afc03df8e96020 100644 (file)
@@ -218,12 +218,13 @@ static struct fss_sc *sc_lookup_volname(struct fss_sc *sc_head,
        return NULL;
 }
 
+/* lookup is case-insensitive */
 static struct fss_sc_smap *sc_smap_lookup(struct fss_sc_smap *smaps_head,
-                                        const char *share)
+                                         const char *share)
 {
        struct fss_sc_smap *sc_smap;
        for (sc_smap = smaps_head; sc_smap; sc_smap = sc_smap->next) {
-               if (!strcmp(sc_smap->share_name, share)) {
+               if (!strcasecmp_m(sc_smap->share_name, share)) {
                        return sc_smap;
                }
        }