summaryrefslogtreecommitdiffstats
path: root/private/utils/wizards/shrpub/turtle.h
blob: de9212417e2344ae93f4a008659e45735f649e11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
/*++

Copyright (c) 1996  Microsoft Corporation

Module Name:

	turtle.h : main header file for the TURTLE application

File History:

	JonY	Jan-96	created

--*/

// 
//

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

/////////////////////////////////////////////////////////////////////////////
// CMySheet

class CMySheet : public CPropertySheet
{
	DECLARE_DYNAMIC(CMySheet)

// Construction
public:
	CMySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
	CMySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
	CMySheet();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMySheet)
	public:
	virtual BOOL OnInitDialog();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMySheet();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMySheet)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

#define RERUN_SFM	0x00000001
#define RERUN_SMB	0x00000002
#define RERUN_FPNW	0x00000004

/////////////////////////////////////////////////////////////////////////////
// User / permission items displayed in CListCtrl objects
class CDisplayInfo
{
	public:
		CString csName;
		CString csPermission;
		DWORD dwPermission;
		DWORD dwPermission2;
		CString csDisplay;
		BOOL bAccessDenied;

};

////////////////////////////////////////////////////////////////////////////
// CTurtleApp:
// See turtle.cpp for the implementation of this class
//
typedef struct tagTREEINFO
{
	HTREEITEM	hTreeItem;
	DWORD		dwBufSize;
	CObject*	pTree;
	BOOL		bExpand;
}
TREEINFO, *PTREEINFO;

class CTurtleApp : public CWinApp
{
public:
	CTurtleApp();
	~CTurtleApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTurtleApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CTurtleApp)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

public:
	BOOL IsSecondInstance();
	void LoadDomainList();
//	void CatalogAccounts(const TCHAR* lpDomain, CUserList* pListBox, BOOL bLocal = FALSE);
	short sParseAdminPath(CString& csDirectoryName, CString& csCurrentDrive);

	CMySheet m_cps1/*(_T("title"))*/;

	short m_nShareType;
	unsigned short m_sMode; // 0 - FAT file 1 - NTFS file 2 - FAT vol 3 - NTFS vol

// something on the cmd line?
	BOOL m_bReentrant;

// wizard data
	CString m_csSFMOwnerName;
	CString m_csSFMGroupName;
	CString m_csMyDomainName;
	CString m_csMyUserName;
	CString m_csMyMachineName;
	CString m_csPrimaryDomain;

	CString m_csSharePath;
	CStringArray m_csaDomainList;
	CString m_csRemoteServer;
	CString m_csRemoteServerPath;
	CString m_csRemoteServerDrivePath;

	CString m_csShareName;
	CString m_csShareComment;

	BOOL m_bGoFPNW;
	BOOL m_bGoSFM;
	BOOL m_bGoSMB;

	BOOL m_bPermitSFM;
	BOOL m_bPermitFPNW;
	BOOL m_bPermitSMB;

// specific SFM permissions
	BOOL	m_bEveryoneMakeChanges;
	BOOL	m_bEveryoneSeeFiles;
	BOOL	m_bEveryoneSeeFolders;
	BOOL	m_bGroupMakeChanges;
	BOOL	m_bGroupSeeFiles;
	BOOL	m_bGroupSeeFolders;
	BOOL	m_bOwnerMakeChanges;
	BOOL	m_bOwnerSeeFiles;
	BOOL	m_bOwnerSeeFolders;

	BOOL DoSharing();

	BOOL m_bServer;
	BOOL m_bDomain;
	CString m_csServer;
	CString m_csDomain;
	CString m_csCurrentDomain;
	CString m_csCurrentMachine;

	DWORD m_bReRun;

	BOOL m_bShareThis;

// permissions list stuff
	USHORT m_sEntryArrayCount;
	long m_lEntryArray[1000];
	BOOL m_bSetPermissions;
	BOOL m_bApplyRecursively;

private:
	BOOL CreateSID(PSECURITY_DESCRIPTOR pSD);
	void ApplyDownStream(const TCHAR* csPath, PSECURITY_DESCRIPTOR pSD);
	BOOL AddAces(ACL* pACL);
	ACL* m_pACL;

};


/////////////////////////////////////////////////////////////////////////////