~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to source/rpc_server/srv_dfs_nt.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
2
 *  Unix SMB/CIFS implementation.
3
3
 *  RPC Pipe client / server routines for Dfs
4
 
 *  Copyright (C) Andrew Tridgell              1992-1997,
5
 
 *  Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
6
 
 *  Copyright (C) Shirish Kalele               2000.
7
 
 *  Copyright (C) Jeremy Allison                                2001.
 
4
 *  Copyright (C) Shirish Kalele        2000.
 
5
 *  Copyright (C) Jeremy Allison        2001.
 
6
 *  Copyright (C) Jelmer Vernooij       2005.
8
7
 *  
9
8
 *  This program is free software; you can redistribute it and/or modify
10
9
 *  it under the terms of the GNU General Public License as published by
24
23
/* This is the implementation of the dfs pipe. */
25
24
 
26
25
#include "includes.h"
27
 
#include "nterr.h"
28
26
 
29
27
#undef DBGC_CLASS
30
28
#define DBGC_CLASS DBGC_MSDFS
32
30
/* This function does not return a WERROR or NTSTATUS code but rather 1 if
33
31
   dfs exists, or 0 otherwise. */
34
32
 
35
 
uint32 _dfs_exist(pipes_struct *p, DFS_Q_DFS_EXIST *q_u, DFS_R_DFS_EXIST *r_u)
 
33
uint32 _dfs_GetManagerVersion(pipes_struct *p, NETDFS_Q_DFS_GETMANAGERVERSION *q_u, NETDFS_R_DFS_GETMANAGERVERSION *r_u)
36
34
{
37
35
        if(lp_host_msdfs()) 
38
36
                return 1;
40
38
                return 0;
41
39
}
42
40
 
43
 
WERROR _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u)
 
41
WERROR _dfs_Add(pipes_struct *p, NETDFS_Q_DFS_ADD* q_u, NETDFS_R_DFS_ADD *r_u)
44
42
{
45
43
        struct current_user user;
46
44
        struct junction_map jn;
52
50
 
53
51
        get_current_user(&user,p);
54
52
 
55
 
        if (user.uid != 0) {
 
53
        if (user.ut.uid != 0) {
56
54
                DEBUG(10,("_dfs_add: uid != 0. Access denied.\n"));
57
55
                return WERR_ACCESS_DENIED;
58
56
        }
59
57
 
60
 
        unistr2_to_ascii(dfspath, &q_u->DfsEntryPath, sizeof(dfspath)-1);
61
 
        unistr2_to_ascii(servername, &q_u->ServerName, sizeof(servername)-1);
62
 
        unistr2_to_ascii(sharename, &q_u->ShareName, sizeof(sharename)-1);
 
58
        unistr2_to_ascii(dfspath, &q_u->path, sizeof(dfspath)-1);
 
59
        unistr2_to_ascii(servername, &q_u->server, sizeof(servername)-1);
 
60
        unistr2_to_ascii(sharename, &q_u->share, sizeof(sharename)-1);
63
61
 
64
62
        DEBUG(5,("init_reply_dfs_add: Request to add %s -> %s\\%s.\n",
65
63
                dfspath, servername, sharename));
103
101
        return WERR_OK;
104
102
}
105
103
 
106
 
WERROR _dfs_remove(pipes_struct *p, DFS_Q_DFS_REMOVE *q_u, 
107
 
                   DFS_R_DFS_REMOVE *r_u)
 
104
WERROR _dfs_Remove(pipes_struct *p, NETDFS_Q_DFS_REMOVE *q_u, 
 
105
                   NETDFS_R_DFS_REMOVE *r_u)
108
106
{
109
107
        struct current_user user;
110
108
        struct junction_map jn;
115
113
 
116
114
        get_current_user(&user,p);
117
115
 
118
 
        if (user.uid != 0) {
 
116
        if (user.ut.uid != 0) {
119
117
                DEBUG(10,("_dfs_remove: uid != 0. Access denied.\n"));
120
118
                return WERR_ACCESS_DENIED;
121
119
        }
122
120
 
123
 
        unistr2_to_ascii(dfspath, &q_u->DfsEntryPath, sizeof(dfspath)-1);
124
 
        if(q_u->ptr_ServerName) {
125
 
                unistr2_to_ascii(servername, &q_u->ServerName, sizeof(servername)-1);
126
 
        }
127
 
 
128
 
        if(q_u->ptr_ShareName) {
129
 
                unistr2_to_ascii(sharename, &q_u->ShareName, sizeof(sharename)-1);
130
 
        }
131
 
 
132
 
        if(q_u->ptr_ServerName && q_u->ptr_ShareName) {
 
121
        unistr2_to_ascii(dfspath, &q_u->path, sizeof(dfspath)-1);
 
122
        if(q_u->ptr0_server) {
 
123
                unistr2_to_ascii(servername, &q_u->server, sizeof(servername)-1);
 
124
        }
 
125
 
 
126
        if(q_u->ptr0_share) {
 
127
                unistr2_to_ascii(sharename, &q_u->share, sizeof(sharename)-1);
 
128
        }
 
129
 
 
130
        if(q_u->ptr0_server && q_u->ptr0_share) {
133
131
                pstrcpy(altpath, servername);
134
132
                pstrcat(altpath, "\\");
135
133
                pstrcat(altpath, sharename);
144
142
        }
145
143
 
146
144
        /* if no server-share pair given, remove the msdfs link completely */
147
 
        if(!q_u->ptr_ServerName && !q_u->ptr_ShareName) {
 
145
        if(!q_u->ptr0_server && !q_u->ptr0_share) {
148
146
                if(!remove_msdfs_link(&jn)) {
149
147
                        vfs_ChDir(p->conn,p->conn->connectpath);
150
148
                        return WERR_DFS_NO_SUCH_VOL;
189
187
        return WERR_OK;
190
188
}
191
189
 
192
 
static BOOL init_reply_dfs_info_1(struct junction_map* j, DFS_INFO_1* dfs1, int num_j)
193
 
{
194
 
        int i=0;
195
 
        for(i=0;i<num_j;i++) {
196
 
                pstring str;
197
 
                dfs1[i].ptr_entrypath = 1;
198
 
                slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s\\%s", global_myname(), 
199
 
                        j[i].service_name, j[i].volume_name);
200
 
                DEBUG(5,("init_reply_dfs_info_1: %d) initing entrypath: %s\n",i,str));
201
 
                init_unistr2(&dfs1[i].entrypath,str,UNI_STR_TERMINATE);
202
 
        }
203
 
        return True;
204
 
}
205
 
 
206
 
static BOOL init_reply_dfs_info_2(struct junction_map* j, DFS_INFO_2* dfs2, int num_j)
207
 
{
208
 
        int i=0;
209
 
        for(i=0;i<num_j;i++) {
210
 
                pstring str;
211
 
                dfs2[i].ptr_entrypath = 1;
 
190
static BOOL init_reply_dfs_info_1(struct junction_map* j, NETDFS_DFS_INFO1* dfs1)
 
191
{
 
192
        pstring str;
 
193
        dfs1->ptr0_path = 1;
 
194
        slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s\\%s", global_myname(), 
 
195
                j->service_name, j->volume_name);
 
196
        DEBUG(5,("init_reply_dfs_info_1: initing entrypath: %s\n",str));
 
197
        init_unistr2(&dfs1->path,str,UNI_STR_TERMINATE);
 
198
        return True;
 
199
}
 
200
 
 
201
static BOOL init_reply_dfs_info_2(struct junction_map* j, NETDFS_DFS_INFO2* dfs2)
 
202
{
 
203
        pstring str;
 
204
        dfs2->ptr0_path = 1;
 
205
        slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s\\%s", global_myname(),
 
206
                j->service_name, j->volume_name);
 
207
        init_unistr2(&dfs2->path, str, UNI_STR_TERMINATE);
 
208
        dfs2->ptr0_comment = 0;
 
209
        init_unistr2(&dfs2->comment, j->comment, UNI_STR_TERMINATE);
 
210
        dfs2->state = 1; /* set up state of dfs junction as OK */
 
211
        dfs2->num_stores = j->referral_count;
 
212
        return True;
 
213
}
 
214
 
 
215
static BOOL init_reply_dfs_info_3(TALLOC_CTX *ctx, struct junction_map* j, NETDFS_DFS_INFO3* dfs3)
 
216
{
 
217
        int ii;
 
218
        pstring str;
 
219
        dfs3->ptr0_path = 1;
 
220
        if (j->volume_name[0] == '\0')
 
221
                slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s",
 
222
                        global_myname(), j->service_name);
 
223
        else
212
224
                slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s\\%s", global_myname(),
213
 
                        j[i].service_name, j[i].volume_name);
214
 
                init_unistr2(&dfs2[i].entrypath, str, UNI_STR_TERMINATE);
215
 
                dfs2[i].ptr_comment = 0;
216
 
                dfs2[i].state = 1; /* set up state of dfs junction as OK */
217
 
                dfs2[i].num_storages = j[i].referral_count;
218
 
        }
219
 
        return True;
220
 
}
221
 
 
222
 
static BOOL init_reply_dfs_info_3(TALLOC_CTX *ctx, struct junction_map* j, DFS_INFO_3* dfs3, int num_j)
223
 
{
224
 
        int i=0,ii=0;
225
 
        for(i=0;i<num_j;i++) {
226
 
                pstring str;
227
 
                dfs3[i].ptr_entrypath = 1;
228
 
                if (j[i].volume_name[0] == '\0')
229
 
                        slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s",
230
 
                                global_myname(), j[i].service_name);
231
 
                else
232
 
                        slprintf(str, sizeof(pstring)-1, "\\\\%s\\%s\\%s", global_myname(),
233
 
                                j[i].service_name, j[i].volume_name);
234
 
 
235
 
                init_unistr2(&dfs3[i].entrypath, str, UNI_STR_TERMINATE);
236
 
                dfs3[i].ptr_comment = 1;
237
 
                init_unistr2(&dfs3[i].comment, "", UNI_STR_TERMINATE);
238
 
                dfs3[i].state = 1;
239
 
                dfs3[i].num_storages = dfs3[i].num_storage_infos = j[i].referral_count;
240
 
                dfs3[i].ptr_storages = 1;
241
 
     
242
 
                /* also enumerate the storages */
243
 
                dfs3[i].storages = TALLOC_ARRAY(ctx, DFS_STORAGE_INFO, j[i].referral_count);
244
 
                if (!dfs3[i].storages)
245
 
                        return False;
246
 
 
247
 
                memset(dfs3[i].storages, '\0', j[i].referral_count * sizeof(DFS_STORAGE_INFO));
248
 
 
249
 
                for(ii=0;ii<j[i].referral_count;ii++) {
250
 
                        char* p; 
251
 
                        pstring path;
252
 
                        DFS_STORAGE_INFO* stor = &(dfs3[i].storages[ii]);
253
 
                        struct referral* ref = &(j[i].referral_list[ii]);
254
 
          
255
 
                        pstrcpy(path, ref->alternate_path);
256
 
                        trim_char(path,'\\','\0');
257
 
                        p = strrchr_m(path,'\\');
258
 
                        if(p==NULL) {
259
 
                                DEBUG(4,("init_reply_dfs_info_3: invalid path: no \\ found in %s\n",path));
260
 
                                continue;
261
 
                        }
262
 
                        *p = '\0';
263
 
                        DEBUG(5,("storage %d: %s.%s\n",ii,path,p+1));
264
 
                        stor->state = 2; /* set all storages as ONLINE */
265
 
                        init_unistr2(&stor->servername, path, UNI_STR_TERMINATE);
266
 
                        init_unistr2(&stor->sharename,  p+1, UNI_STR_TERMINATE);
267
 
                        stor->ptr_servername = stor->ptr_sharename = 1;
 
225
                        j->service_name, j->volume_name);
 
226
 
 
227
        init_unistr2(&dfs3->path, str, UNI_STR_TERMINATE);
 
228
        dfs3->ptr0_comment = 1;
 
229
        init_unistr2(&dfs3->comment, j->comment, UNI_STR_TERMINATE);
 
230
        dfs3->state = 1;
 
231
        dfs3->num_stores = dfs3->size_stores = j->referral_count;
 
232
        dfs3->ptr0_stores = 1;
 
233
    
 
234
        /* also enumerate the stores */
 
235
        dfs3->stores = TALLOC_ARRAY(ctx, NETDFS_DFS_STORAGEINFO, j->referral_count);
 
236
        if (!dfs3->stores)
 
237
                return False;
 
238
 
 
239
        memset(dfs3->stores, '\0', j->referral_count * sizeof(NETDFS_DFS_STORAGEINFO));
 
240
 
 
241
        for(ii=0;ii<j->referral_count;ii++) {
 
242
                char* p; 
 
243
                pstring path;
 
244
                NETDFS_DFS_STORAGEINFO* stor = &(dfs3->stores[ii]);
 
245
                struct referral* ref = &(j->referral_list[ii]);
 
246
  
 
247
                pstrcpy(path, ref->alternate_path);
 
248
                trim_char(path,'\\','\0');
 
249
                p = strrchr_m(path,'\\');
 
250
                if(p==NULL) {
 
251
                        DEBUG(4,("init_reply_dfs_info_3: invalid path: no \\ found in %s\n",path));
 
252
                        continue;
268
253
                }
 
254
                *p = '\0';
 
255
                DEBUG(5,("storage %d: %s.%s\n",ii,path,p+1));
 
256
                stor->state = 2; /* set all stores as ONLINE */
 
257
                init_unistr2(&stor->server, path, UNI_STR_TERMINATE);
 
258
                init_unistr2(&stor->share,  p+1, UNI_STR_TERMINATE);
 
259
                stor->ptr0_server = stor->ptr0_share = 1;
269
260
        }
270
261
        return True;
271
262
}
272
263
 
273
 
static WERROR init_reply_dfs_ctr(TALLOC_CTX *ctx, uint32 level, 
274
 
                                   DFS_INFO_CTR* ctr, struct junction_map* jn,
275
 
                                   int num_jn)
276
 
{
277
 
        /* do the levels */
278
 
        switch(level) {
 
264
static BOOL init_reply_dfs_info_100(struct junction_map* j, NETDFS_DFS_INFO100* dfs100)
 
265
{
 
266
        dfs100->ptr0_comment = 1;
 
267
        init_unistr2(&dfs100->comment, j->comment, UNI_STR_TERMINATE);
 
268
        return True;
 
269
}
 
270
 
 
271
 
 
272
WERROR _dfs_Enum(pipes_struct *p, NETDFS_Q_DFS_ENUM *q_u, NETDFS_R_DFS_ENUM *r_u)
 
273
{
 
274
        uint32 level = q_u->level;
 
275
        struct junction_map jn[MAX_MSDFS_JUNCTIONS];
 
276
        int num_jn = 0;
 
277
        int i;
 
278
 
 
279
        num_jn = enum_msdfs_links(p->mem_ctx, jn, ARRAY_SIZE(jn));
 
280
        vfs_ChDir(p->conn,p->conn->connectpath);
 
281
    
 
282
        DEBUG(5,("_dfs_Enum: %d junctions found in Dfs, doing level %d\n", num_jn, level));
 
283
 
 
284
        r_u->ptr0_info = q_u->ptr0_info;
 
285
        r_u->ptr0_total = q_u->ptr0_total;
 
286
        r_u->total = num_jn;
 
287
 
 
288
        r_u->info = q_u->info;
 
289
 
 
290
        /* Create the return array */
 
291
        switch (level) {
279
292
        case 1:
280
 
                {
281
 
                DFS_INFO_1* dfs1;
282
 
                dfs1 = TALLOC_ARRAY(ctx, DFS_INFO_1, num_jn);
283
 
                if (!dfs1)
 
293
                if ((r_u->info.e.u.info1.s = TALLOC_ARRAY(p->mem_ctx, NETDFS_DFS_INFO1, num_jn)) == NULL) {
284
294
                        return WERR_NOMEM;
285
 
                init_reply_dfs_info_1(jn, dfs1, num_jn);
286
 
                ctr->dfs.info1 = dfs1;
 
295
                }
 
296
                r_u->info.e.u.info1.count = num_jn;
 
297
                r_u->info.e.u.info1.ptr0_s = 1;
 
298
                r_u->info.e.u.info1.size_s = num_jn;
287
299
                break;
288
 
                }
289
300
        case 2:
290
 
                {
291
 
                DFS_INFO_2* dfs2;
292
 
                dfs2 = TALLOC_ARRAY(ctx, DFS_INFO_2, num_jn);
293
 
                if (!dfs2)
 
301
                if ((r_u->info.e.u.info2.s = TALLOC_ARRAY(p->mem_ctx, NETDFS_DFS_INFO2, num_jn)) == NULL) {
294
302
                        return WERR_NOMEM;
295
 
                init_reply_dfs_info_2(jn, dfs2, num_jn);
296
 
                ctr->dfs.info2 = dfs2;
 
303
                }
 
304
                r_u->info.e.u.info2.count = num_jn;
 
305
                r_u->info.e.u.info2.ptr0_s = 1;
 
306
                r_u->info.e.u.info2.size_s = num_jn;
297
307
                break;
298
 
                }
299
308
        case 3:
300
 
                {
301
 
                DFS_INFO_3* dfs3;
302
 
                dfs3 = TALLOC_ARRAY(ctx, DFS_INFO_3, num_jn);
303
 
                if (!dfs3)
 
309
                if ((r_u->info.e.u.info3.s = TALLOC_ARRAY(p->mem_ctx, NETDFS_DFS_INFO3, num_jn)) == NULL) {
304
310
                        return WERR_NOMEM;
305
 
                init_reply_dfs_info_3(ctx, jn, dfs3, num_jn);
306
 
                ctr->dfs.info3 = dfs3;
 
311
                }
 
312
                r_u->info.e.u.info3.count = num_jn;
 
313
                r_u->info.e.u.info3.ptr0_s = 1;
 
314
                r_u->info.e.u.info3.size_s = num_jn;
307
315
                break;
308
 
                }
309
316
        default:
310
317
                return WERR_INVALID_PARAM;
311
318
        }
312
 
        return WERR_OK;
313
 
}
314
 
      
315
 
WERROR _dfs_enum(pipes_struct *p, DFS_Q_DFS_ENUM *q_u, DFS_R_DFS_ENUM *r_u)
316
 
{
317
 
        uint32 level = q_u->level;
318
 
        struct junction_map jn[MAX_MSDFS_JUNCTIONS];
319
 
        int num_jn = 0;
320
 
 
321
 
        num_jn = enum_msdfs_links(p->mem_ctx, jn, ARRAY_SIZE(jn));
322
 
        vfs_ChDir(p->conn,p->conn->connectpath);
323
 
    
324
 
        DEBUG(5,("make_reply_dfs_enum: %d junctions found in Dfs, doing level %d\n", num_jn, level));
325
 
 
326
 
        r_u->ptr_buffer = level;
327
 
        r_u->level = r_u->level2 = level;
328
 
        r_u->ptr_num_entries = r_u->ptr_num_entries2 = 1;
329
 
        r_u->num_entries = r_u->num_entries2 = num_jn;
330
 
        r_u->reshnd.ptr_hnd = 1;
331
 
        r_u->reshnd.handle = num_jn;
332
 
  
333
 
        r_u->ctr = TALLOC_P(p->mem_ctx, DFS_INFO_CTR);
334
 
        if (!r_u->ctr)
335
 
                return WERR_NOMEM;
336
 
        ZERO_STRUCTP(r_u->ctr);
337
 
        r_u->ctr->switch_value = level;
338
 
        r_u->ctr->num_entries = num_jn;
339
 
        r_u->ctr->ptr_dfs_ctr = 1;
340
 
  
341
 
        r_u->status = init_reply_dfs_ctr(p->mem_ctx, level, r_u->ctr, jn, num_jn);
 
319
 
 
320
        for (i = 0; i < num_jn; i++) {
 
321
                switch (level) {
 
322
                case 1: 
 
323
                        init_reply_dfs_info_1(&jn[i], &r_u->info.e.u.info1.s[i]);
 
324
                        break;
 
325
                case 2:
 
326
                        init_reply_dfs_info_2(&jn[i], &r_u->info.e.u.info2.s[i]);
 
327
                        break;
 
328
                case 3:
 
329
                        init_reply_dfs_info_3(p->mem_ctx, &jn[i], &r_u->info.e.u.info3.s[i]);
 
330
                        break;
 
331
                default:
 
332
                        return WERR_INVALID_PARAM;
 
333
                }
 
334
        }
 
335
  
 
336
        r_u->status = WERR_OK;
342
337
 
343
338
        return r_u->status;
344
339
}
345
340
      
346
 
WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u, 
347
 
                     DFS_R_DFS_GET_INFO *r_u)
 
341
WERROR _dfs_GetInfo(pipes_struct *p, NETDFS_Q_DFS_GETINFO *q_u, 
 
342
                     NETDFS_R_DFS_GETINFO *r_u)
348
343
{
349
 
        UNISTR2* uni_path = &q_u->uni_path;
 
344
        UNISTR2* uni_path = &q_u->path;
350
345
        uint32 level = q_u->level;
351
346
        int consumedcnt = sizeof(pstring);
352
347
        pstring path;
 
348
        BOOL ret = False;
353
349
        struct junction_map jn;
354
350
 
355
351
        unistr2_to_ascii(path, uni_path, sizeof(path)-1);
363
359
        }
364
360
 
365
361
        vfs_ChDir(p->conn,p->conn->connectpath);
366
 
        r_u->level = level;
367
 
        r_u->ptr_ctr = 1;
368
 
        r_u->status = init_reply_dfs_ctr(p->mem_ctx, level, &r_u->ctr, &jn, 1);
 
362
        r_u->info.switch_value = level;
 
363
        r_u->info.ptr0 = 1;
 
364
        r_u->status = WERR_OK;
 
365
 
 
366
        switch (level) {
 
367
                case 1: ret = init_reply_dfs_info_1(&jn, &r_u->info.u.info1); break;
 
368
                case 2: ret = init_reply_dfs_info_2(&jn, &r_u->info.u.info2); break;
 
369
                case 3: ret = init_reply_dfs_info_3(p->mem_ctx, &jn, &r_u->info.u.info3); break;
 
370
                case 100: ret = init_reply_dfs_info_100(&jn, &r_u->info.u.info100); break;
 
371
                default:
 
372
                        r_u->info.ptr0 = 1;
 
373
                        r_u->info.switch_value = 0;
 
374
                        r_u->status = WERR_OK;
 
375
                        ret = True;
 
376
                        break;
 
377
        }
 
378
 
 
379
        if (!ret) 
 
380
                r_u->status = WERR_INVALID_PARAM;
369
381
  
370
382
        return r_u->status;
371
383
}
 
384
 
 
385
WERROR _dfs_SetInfo(pipes_struct *p, NETDFS_Q_DFS_SETINFO *q_u, NETDFS_R_DFS_SETINFO *r_u)
 
386
{
 
387
        /* FIXME: Implement your code here */
 
388
        return WERR_NOT_SUPPORTED;
 
389
}
 
390
 
 
391
WERROR _dfs_Rename(pipes_struct *p, NETDFS_Q_DFS_RENAME *q_u, NETDFS_R_DFS_RENAME *r_u)
 
392
{
 
393
        /* FIXME: Implement your code here */
 
394
        return WERR_NOT_SUPPORTED;
 
395
}
 
396
 
 
397
WERROR _dfs_Move(pipes_struct *p, NETDFS_Q_DFS_MOVE *q_u, NETDFS_R_DFS_MOVE *r_u)
 
398
{
 
399
        /* FIXME: Implement your code here */
 
400
        return WERR_NOT_SUPPORTED;
 
401
}
 
402
 
 
403
WERROR _dfs_ManagerGetConfigInfo(pipes_struct *p, NETDFS_Q_DFS_MANAGERGETCONFIGINFO *q_u, NETDFS_R_DFS_MANAGERGETCONFIGINFO *r_u)
 
404
{
 
405
        /* FIXME: Implement your code here */
 
406
        return WERR_NOT_SUPPORTED;
 
407
}
 
408
 
 
409
WERROR _dfs_ManagerSendSiteInfo(pipes_struct *p, NETDFS_Q_DFS_MANAGERSENDSITEINFO *q_u, NETDFS_R_DFS_MANAGERSENDSITEINFO *r_u)
 
410
{
 
411
        /* FIXME: Implement your code here */
 
412
        return WERR_NOT_SUPPORTED;
 
413
}
 
414
 
 
415
WERROR _dfs_AddFtRoot(pipes_struct *p, NETDFS_Q_DFS_ADDFTROOT *q_u, NETDFS_R_DFS_ADDFTROOT *r_u)
 
416
{
 
417
        /* FIXME: Implement your code here */
 
418
        return WERR_NOT_SUPPORTED;
 
419
}
 
420
 
 
421
WERROR _dfs_RemoveFtRoot(pipes_struct *p, NETDFS_Q_DFS_REMOVEFTROOT *q_u, NETDFS_R_DFS_REMOVEFTROOT *r_u)
 
422
{
 
423
        /* FIXME: Implement your code here */
 
424
        return WERR_NOT_SUPPORTED;
 
425
}
 
426
 
 
427
WERROR _dfs_AddStdRoot(pipes_struct *p, NETDFS_Q_DFS_ADDSTDROOT *q_u, NETDFS_R_DFS_ADDSTDROOT *r_u)
 
428
{
 
429
        /* FIXME: Implement your code here */
 
430
        return WERR_NOT_SUPPORTED;
 
431
}
 
432
 
 
433
WERROR _dfs_RemoveStdRoot(pipes_struct *p, NETDFS_Q_DFS_REMOVESTDROOT *q_u, NETDFS_R_DFS_REMOVESTDROOT *r_u)
 
434
{
 
435
        /* FIXME: Implement your code here */
 
436
        return WERR_NOT_SUPPORTED;
 
437
}
 
438
 
 
439
WERROR _dfs_ManagerInitialize(pipes_struct *p, NETDFS_Q_DFS_MANAGERINITIALIZE *q_u, NETDFS_R_DFS_MANAGERINITIALIZE *r_u)
 
440
{
 
441
        /* FIXME: Implement your code here */
 
442
        return WERR_NOT_SUPPORTED;
 
443
}
 
444
 
 
445
WERROR _dfs_AddStdRootForced(pipes_struct *p, NETDFS_Q_DFS_ADDSTDROOTFORCED *q_u, NETDFS_R_DFS_ADDSTDROOTFORCED *r_u)
 
446
{
 
447
        /* FIXME: Implement your code here */
 
448
        return WERR_NOT_SUPPORTED;
 
449
}
 
450
 
 
451
WERROR _dfs_GetDcAddress(pipes_struct *p, NETDFS_Q_DFS_GETDCADDRESS *q_u, NETDFS_R_DFS_GETDCADDRESS *r_u)
 
452
{
 
453
        /* FIXME: Implement your code here */
 
454
        return WERR_NOT_SUPPORTED;
 
455
}
 
456
 
 
457
WERROR _dfs_SetDcAddress(pipes_struct *p, NETDFS_Q_DFS_SETDCADDRESS *q_u, NETDFS_R_DFS_SETDCADDRESS *r_u)
 
458
{
 
459
        /* FIXME: Implement your code here */
 
460
        return WERR_NOT_SUPPORTED;
 
461
}
 
462
 
 
463
WERROR _dfs_FlushFtTable(pipes_struct *p, NETDFS_Q_DFS_FLUSHFTTABLE *q_u, NETDFS_R_DFS_FLUSHFTTABLE *r_u)
 
464
{
 
465
        /* FIXME: Implement your code here */
 
466
        return WERR_NOT_SUPPORTED;
 
467
}
 
468
 
 
469
WERROR _dfs_Add2(pipes_struct *p, NETDFS_Q_DFS_ADD2 *q_u, NETDFS_R_DFS_ADD2 *r_u)
 
470
{
 
471
        /* FIXME: Implement your code here */
 
472
        return WERR_NOT_SUPPORTED;
 
473
}
 
474
 
 
475
WERROR _dfs_Remove2(pipes_struct *p, NETDFS_Q_DFS_REMOVE2 *q_u, NETDFS_R_DFS_REMOVE2 *r_u)
 
476
{
 
477
        /* FIXME: Implement your code here */
 
478
        return WERR_NOT_SUPPORTED;
 
479
}
 
480
 
 
481
WERROR _dfs_EnumEx(pipes_struct *p, NETDFS_Q_DFS_ENUMEX *q_u, NETDFS_R_DFS_ENUMEX *r_u)
 
482
{
 
483
        /* FIXME: Implement your code here */
 
484
        return WERR_NOT_SUPPORTED;
 
485
}
 
486
 
 
487
WERROR _dfs_SetInfo2(pipes_struct *p, NETDFS_Q_DFS_SETINFO2 *q_u, NETDFS_R_DFS_SETINFO2 *r_u)
 
488
{
 
489
        /* FIXME: Implement your code here */
 
490
        return WERR_NOT_SUPPORTED;
 
491
}
 
492