- don't use env variables for passwords and usernames (yeah!)
[Samba/gbeck.git] / source / smbwrapper / smbw.h
blob8de5b5776a07b61c7e49cc353adbf844bf0cfced
1 /*
2 Unix SMB/Netbios implementation.
3 Version 2.0
4 SMB wrapper functions - definitions
5 Copyright (C) Andrew Tridgell 1998
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #define SMBW_PREFIX "/smb/"
23 #define SMBW_DUMMY "/dev/null"
25 #define SMBW_CLI_FD 512
26 #define SMBW_MAX_OPEN 8192
28 #define SMBW_FILE_MODE (S_IFREG | 0444)
29 #define SMBW_DIR_MODE (S_IFDIR | 0555)
31 #define SMBW_PWD_ENV "PWD"
33 struct smbw_server {
34 struct smbw_server *next, *prev;
35 struct cli_state cli;
36 char *server_name;
37 char *share_name;
38 dev_t dev;
39 BOOL no_pathinfo2;
42 struct smbw_filedes {
43 int cli_fd;
44 int ref_count;
45 char *fname;
46 off_t offset;
49 struct smbw_file {
50 struct smbw_file *next, *prev;
51 struct smbw_filedes *f;
52 int fd;
53 struct smbw_server *srv;
56 struct smbw_dir {
57 struct smbw_dir *next, *prev;
58 int fd;
59 int offset, count, malloced;
60 struct smbw_server *srv;
61 struct file_info *list;
62 char *path;