#include "libds/common/roles.h"
/* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-2015"
+#define COPYRIGHT_STARTUP_MESSAGE "Copyright Andrew Tridgell and the Samba Team 1992-2018"
#define SAFETY_MARGIN 1024
#define LARGE_WRITEX_HDR_SIZE 65
#define SIZEOFWORD 2
-#ifndef DEF_CREATE_MASK
-#define DEF_CREATE_MASK (0755)
-#endif
-
/* string manipulation flags - see clistr.c and srvstr.c */
#define STR_TERMINATE 1
#define STR_UPPER 2
#include "librpc/gen_ndr/security.h"
-struct idle_event;
struct share_mode_entry;
struct uuid;
struct named_mutex;
struct wb_context;
struct rpc_cli_smbd_conn;
-struct fncall_context;
/* the basic packet size, assuming no words or bytes */
#define smb_size 39
struct current_user {
struct connection_struct *conn;
uint64_t vuid; /* SMB2 compat */
+ bool need_chdir;
+ bool done_chdir;
struct security_unix_token ut;
struct security_token *nt_user_token;
};
struct sockaddr_storage ip;
struct sockaddr_storage netmask;
struct sockaddr_storage bcast;
+ uint32_t if_index;
+ uint64_t linkspeed;
+ uint32_t capability;
};
#define SHARE_MODE_FLAG_POSIX_OPEN 0x1
/* Private options for printer support */
#define NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE 0x0008
+/* Private option for streams support */
+#define NTCREATEX_OPTIONS_PRIVATE_STREAM_BASEOPEN 0x0010
+
/* Flag for NT transact rename call. */
#define RENAME_REPLACE_IF_EXISTS 1
otherwise NT will not honour the announce packets */
#define MAX_SERVER_STRING_LENGTH 48
-
-#define SMB_SUCCESS 0 /* The request was successful. */
-
-#ifdef WITH_DFS
-void dfs_unlogin(void);
-extern int dcelogin_atmost_once;
-#endif
-
#ifdef NOSTRDUP
char *strdup(char *s);
#endif
#define NO_SUBSTREAMS 0x2
#define NO_REPARSETAG 0x4
-/* Remote architectures we know about. */
+/* Remote architectures we know about, keep in sync with remote_arch_strings */
enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA,
RA_SAMBA, RA_CIFSFS, RA_WINXP64, RA_OSX};
#define FNUM_FIELD_INVALID 0
-/*
- * Size of buffer to use when moving files across filesystems.
- */
-#define COPYBUF_SIZE (8*1024)
-
/*
- * Map the Core and Extended Oplock requesst bits down
+ * Map the Core and Extended Oplock request bits down
* to common bits (EXCLUSIVE_OPLOCK & BATCH_OPLOCK).
*/
DAC_OVERRIDE_CAPABILITY
};
-/*
- * Kernel oplocks capability flags.
- */
-
-/* Level 2 oplocks are supported natively by kernel oplocks. */
-#define KOPLOCKS_LEVEL2_SUPPORTED 0x1
-
-/* The kernel notifies deferred openers when they can retry the open. */
-#define KOPLOCKS_DEFERRED_OPEN_NOTIFICATION 0x2
-
-/* The kernel notifies smbds when an oplock break times out. */
-#define KOPLOCKS_TIMEOUT_NOTIFICATION 0x4
-
-/* The kernel notifies smbds when an oplock is broken. */
-#define KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION 0x8
-
struct kernel_oplocks_ops;
struct kernel_oplocks {
const struct kernel_oplocks_ops *ops;
- uint32_t flags;
void *private_data;
};
files_struct *fsp, int oplock_type);
void (*release_oplock)(struct kernel_oplocks *ctx,
files_struct *fsp, int oplock_type);
- void (*contend_level2_oplocks_begin)(files_struct *fsp,
- enum level2_contention_type type);
- void (*contend_level2_oplocks_end)(files_struct *fsp,
- enum level2_contention_type type);
};
#include "smb_macros.h"
#define SAFE_NETBIOS_CHARS ". -_"
-/* The maximum length of a trust account password.
- Used when we randomly create it, 15 char passwords
- exceed NT4's max password length */
-
-#define DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH 14
-
#define PORT_NONE 0
#ifndef LDAP_PORT
#define LDAP_PORT 389