mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 02:01:18 -04:00
Merge tag 'v7.1-rc1-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client updates from Steve French: - Fix EAs bounds check - Fix OOB read in symlink response parsing - Add support for creating tmpfiles - Minor debug improvement for mount failure - Minor crypto cleanup - Add missing module description - mount fix for lease vs. nolease - Add Metze as maintainer for smbdirect - Minor error mapping header cleanup - Improve search speed of SMB1 maperror - Fix potential null ptr ref in smb2 map error tests * tag 'v7.1-rc1-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: (26 commits) smb: client: allow both 'lease' and 'nolease' mount options smb: client: get rid of d_drop()+d_add() smb: client: set ATTR_TEMPORARY with O_TMPFILE | O_EXCL smb: client: add support for O_TMPFILE vfs: introduce d_mark_tmpfile_name() MAINTAINERS: create entry for smbdirect smb: client: add missing MODULE_DESCRIPTION() to smb1maperror_test smb: client: fix OOB reads parsing symlink error response smb: client: fix off-by-8 bounds check in check_wsl_eas() smb: client: Remove unnecessary selection of CRYPTO_ECB smb/client: move smb2maperror declarations to smb2proto.h smb/client: introduce KUnit tests to check DOS/SRV err mapping search smb/client: check if SMB1 DOS/SRV error mapping arrays are sorted smb/client: use binary search for SMB1 DOS/SRV error mapping smb/client: autogenerate SMB1 DOS/SRV to POSIX error mapping smb/client: annotate smberr.h with POSIX error codes smb/client: move ERRnetlogonNotStarted to DOS error class smb/client: introduce KUnit test to check ntstatus_to_dos_map search smb/client: check if ntstatus_to_dos_map is sorted smb/client: use binary search for NT status to DOS mapping ...
This commit is contained in:
14
MAINTAINERS
14
MAINTAINERS
@@ -24401,6 +24401,20 @@ T: git https://github.com/cschaufler/smack-next.git
|
||||
F: Documentation/admin-guide/LSM/Smack.rst
|
||||
F: security/smack/
|
||||
|
||||
SMBDIRECT (RDMA Stream Transport with Read/Write-Offload, MS-SMBD)
|
||||
M: Steve French <smfrench@gmail.com>
|
||||
M: Steve French <sfrench@samba.org>
|
||||
M: Namjae Jeon <linkinjeon@kernel.org>
|
||||
M: Namjae Jeon <linkinjeon@samba.org>
|
||||
R: Stefan Metzmacher <metze@samba.org>
|
||||
R: Tom Talpey <tom@talpey.com>
|
||||
L: linux-cifs@vger.kernel.org
|
||||
L: samba-technical@lists.samba.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: fs/smb/client/smbdirect.*
|
||||
F: fs/smb/common/smbdirect/
|
||||
F: fs/smb/server/transport_rdma.*
|
||||
|
||||
SMC91x ETHERNET DRIVER
|
||||
M: Nicolas Pitre <nico@fluxnic.net>
|
||||
S: Odd Fixes
|
||||
|
||||
19
fs/dcache.c
19
fs/dcache.c
@@ -3196,6 +3196,25 @@ void d_mark_tmpfile(struct file *file, struct inode *inode)
|
||||
}
|
||||
EXPORT_SYMBOL(d_mark_tmpfile);
|
||||
|
||||
void d_mark_tmpfile_name(struct file *file, const struct qstr *name)
|
||||
{
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
char *dname = dentry->d_shortname.string;
|
||||
|
||||
BUG_ON(dname_external(dentry));
|
||||
BUG_ON(d_really_is_positive(dentry));
|
||||
BUG_ON(!d_unlinked(dentry));
|
||||
BUG_ON(name->len > DNAME_INLINE_LEN - 1);
|
||||
spin_lock(&dentry->d_parent->d_lock);
|
||||
spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
|
||||
dentry->__d_name.len = name->len;
|
||||
memcpy(dname, name->name, name->len);
|
||||
dname[name->len] = '\0';
|
||||
spin_unlock(&dentry->d_lock);
|
||||
spin_unlock(&dentry->d_parent->d_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(d_mark_tmpfile_name);
|
||||
|
||||
void d_tmpfile(struct file *file, struct inode *inode)
|
||||
{
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
|
||||
3
fs/smb/client/.gitignore
vendored
3
fs/smb/client/.gitignore
vendored
@@ -1 +1,4 @@
|
||||
smb1_mapping_table.c
|
||||
smb1_err_dos_map.c
|
||||
smb1_err_srv_map.c
|
||||
smb2_mapping_table.c
|
||||
|
||||
@@ -9,7 +9,6 @@ config CIFS
|
||||
select CRYPTO_AEAD2
|
||||
select CRYPTO_CCM
|
||||
select CRYPTO_GCM
|
||||
select CRYPTO_ECB
|
||||
select CRYPTO_AES
|
||||
select CRYPTO_LIB_ARC4
|
||||
select CRYPTO_LIB_MD5
|
||||
@@ -217,4 +216,15 @@ config CIFS_COMPRESSION
|
||||
Say Y here if you want SMB traffic to be compressed.
|
||||
If unsure, say N.
|
||||
|
||||
config SMB1_KUNIT_TESTS
|
||||
tristate "KUnit tests for SMB1"
|
||||
depends on SMB_KUNIT_TESTS && CIFS_ALLOW_INSECURE_LEGACY
|
||||
default SMB_KUNIT_TESTS
|
||||
help
|
||||
This builds the SMB1-specific KUnit tests.
|
||||
|
||||
These tests are only enabled when legacy insecure SMB1 support
|
||||
(CIFS_ALLOW_INSECURE_LEGACY) is enabled.
|
||||
|
||||
If unsure, say N.
|
||||
endif
|
||||
|
||||
@@ -7,7 +7,7 @@ obj-$(CONFIG_CIFS) += cifs.o
|
||||
|
||||
cifs-y := trace.o cifsfs.o cifs_debug.o connect.o dir.o file.o \
|
||||
inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
|
||||
cached_dir.o cifs_unicode.o nterr.o cifsencrypt.o \
|
||||
cached_dir.o cifs_unicode.o cifsencrypt.o \
|
||||
readdir.o ioctl.o sess.o export.o unc.o winucase.o \
|
||||
smb2ops.o smb2maperror.o smb2transport.o \
|
||||
smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o \
|
||||
@@ -44,6 +44,26 @@ cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += \
|
||||
|
||||
cifs-$(CONFIG_CIFS_COMPRESSION) += compress.o compress/lz77.o
|
||||
|
||||
ifneq ($(CONFIG_CIFS_ALLOW_INSECURE_LEGACY),)
|
||||
#
|
||||
# Build the SMB1 error mapping tables from nterr.h and smberr.h
|
||||
#
|
||||
smb1-gen-y := smb1_mapping_table.c \
|
||||
smb1_err_dos_map.c \
|
||||
smb1_err_srv_map.c
|
||||
|
||||
$(obj)/smb1_mapping_table.c: $(src)/nterr.h $(src)/gen_smb1_mapping FORCE
|
||||
$(call if_changed,gen_smb1_mapping)
|
||||
|
||||
$(obj)/smb1_err_%.c: $(src)/smberr.h $(src)/gen_smb1_mapping FORCE
|
||||
$(call if_changed,gen_smb1_mapping)
|
||||
|
||||
$(obj)/smb1maperror.o: $(addprefix $(obj)/, $(smb1-gen-y))
|
||||
|
||||
quiet_cmd_gen_smb1_mapping = GEN $@
|
||||
cmd_gen_smb1_mapping = perl $(src)/gen_smb1_mapping $< $@
|
||||
endif
|
||||
|
||||
#
|
||||
# Build the SMB2 error mapping table from smb2status.h
|
||||
#
|
||||
@@ -56,7 +76,8 @@ $(obj)/smb2maperror.o: $(obj)/smb2_mapping_table.c
|
||||
quiet_cmd_gen_smb2_mapping = GEN $@
|
||||
cmd_gen_smb2_mapping = perl $(src)/gen_smb2_mapping $< $@
|
||||
|
||||
obj-$(CONFIG_SMB1_KUNIT_TESTS) += smb1maperror_test.o
|
||||
obj-$(CONFIG_SMB_KUNIT_TESTS) += smb2maperror_test.o
|
||||
|
||||
# Let Kbuild handle tracking and cleaning
|
||||
targets += smb2_mapping_table.c
|
||||
targets += smb2_mapping_table.c $(smb1-gen-y)
|
||||
|
||||
@@ -124,6 +124,9 @@ MODULE_PARM_DESC(dir_cache_timeout, "Number of seconds to cache directory conten
|
||||
/* Module-wide total cached dirents (in bytes) across all tcons */
|
||||
atomic64_t cifs_dircache_bytes_used = ATOMIC64_INIT(0);
|
||||
|
||||
atomic_t cifs_sillycounter;
|
||||
atomic_t cifs_tmpcounter;
|
||||
|
||||
/*
|
||||
* Write-only module parameter to drop all cached directory entries across
|
||||
* all CIFS mounts. Echo a non-zero value to trigger.
|
||||
@@ -1199,6 +1202,7 @@ MODULE_ALIAS("smb3");
|
||||
const struct inode_operations cifs_dir_inode_ops = {
|
||||
.create = cifs_create,
|
||||
.atomic_open = cifs_atomic_open,
|
||||
.tmpfile = cifs_tmpfile,
|
||||
.lookup = cifs_lookup,
|
||||
.getattr = cifs_getattr,
|
||||
.unlink = cifs_unlink,
|
||||
@@ -1911,6 +1915,12 @@ init_cifs(void)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
rc = smb1_init_maperror();
|
||||
if (rc)
|
||||
return rc;
|
||||
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
|
||||
|
||||
rc = smb2_init_maperror();
|
||||
if (rc)
|
||||
return rc;
|
||||
@@ -2148,7 +2158,6 @@ MODULE_DESCRIPTION
|
||||
("VFS to access SMB3 servers e.g. Samba, Macs, Azure and Windows (and "
|
||||
"also older servers complying with the SNIA CIFS Specification)");
|
||||
MODULE_VERSION(CIFS_VERSION);
|
||||
MODULE_SOFTDEP("ecb");
|
||||
MODULE_SOFTDEP("nls");
|
||||
MODULE_SOFTDEP("aes");
|
||||
MODULE_SOFTDEP("cmac");
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
|
||||
#define ROOT_I 2
|
||||
|
||||
extern atomic_t cifs_sillycounter;
|
||||
extern atomic_t cifs_tmpcounter;
|
||||
|
||||
/*
|
||||
* ino_t is 32-bits on 32-bit arch. We have to squash the 64-bit value down
|
||||
* so that it will fit. We use hash_64 to convert the value to 31 bits, and
|
||||
@@ -49,10 +52,12 @@ void cifs_sb_deactive(struct super_block *sb);
|
||||
/* Functions related to inodes */
|
||||
extern const struct inode_operations cifs_dir_inode_ops;
|
||||
struct inode *cifs_root_iget(struct super_block *sb);
|
||||
int cifs_create(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int cifs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *direntry, umode_t mode, bool excl);
|
||||
int cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
int cifs_atomic_open(struct inode *dir, struct dentry *direntry,
|
||||
struct file *file, unsigned int oflags, umode_t mode);
|
||||
int cifs_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode);
|
||||
struct dentry *cifs_lookup(struct inode *parent_dir_inode,
|
||||
struct dentry *direntry, unsigned int flags);
|
||||
int cifs_unlink(struct inode *dir, struct dentry *dentry);
|
||||
@@ -142,6 +147,20 @@ struct smb3_fs_context;
|
||||
struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type, int flags,
|
||||
struct smb3_fs_context *old_ctx);
|
||||
|
||||
char *cifs_silly_fullpath(struct dentry *dentry);
|
||||
|
||||
#define CIFS_TMPNAME_PREFIX ".__smbfile_tmp"
|
||||
#define CIFS_TMPNAME_PREFIX_LEN ((int)sizeof(CIFS_TMPNAME_PREFIX) - 1)
|
||||
#define CIFS_TMPNAME_COUNTER_LEN ((int)sizeof(cifs_tmpcounter) * 2)
|
||||
#define CIFS_TMPNAME_LEN \
|
||||
(CIFS_TMPNAME_PREFIX_LEN + CIFS_TMPNAME_COUNTER_LEN)
|
||||
|
||||
#define CIFS_SILLYNAME_PREFIX ".__smbfile_silly"
|
||||
#define CIFS_SILLYNAME_PREFIX_LEN ((int)sizeof(CIFS_SILLYNAME_PREFIX) - 1)
|
||||
#define CIFS_SILLYNAME_COUNTER_LEN ((int)sizeof(cifs_sillycounter) * 2)
|
||||
#define CIFS_SILLYNAME_LEN \
|
||||
(CIFS_SILLYNAME_PREFIX_LEN + CIFS_SILLYNAME_COUNTER_LEN)
|
||||
|
||||
#ifdef CONFIG_CIFS_NFSD_EXPORT
|
||||
extern const struct export_operations cifs_export_ops;
|
||||
#endif /* CONFIG_CIFS_NFSD_EXPORT */
|
||||
|
||||
@@ -1534,9 +1534,16 @@ int cifs_file_set_size(const unsigned int xid, struct dentry *dentry,
|
||||
#define CIFS_CACHE_RW_FLG (CIFS_CACHE_READ_FLG | CIFS_CACHE_WRITE_FLG)
|
||||
#define CIFS_CACHE_RHW_FLG (CIFS_CACHE_RW_FLG | CIFS_CACHE_HANDLE_FLG)
|
||||
|
||||
/*
|
||||
* One of these for each file inode
|
||||
*/
|
||||
enum cifs_inode_flags {
|
||||
CIFS_INODE_PENDING_OPLOCK_BREAK, /* oplock break in progress */
|
||||
CIFS_INODE_PENDING_WRITERS, /* Writes in progress */
|
||||
CIFS_INODE_FLAG_UNUSED, /* Unused flag */
|
||||
CIFS_INO_DELETE_PENDING, /* delete pending on server */
|
||||
CIFS_INO_INVALID_MAPPING, /* pagecache is invalid */
|
||||
CIFS_INO_LOCK, /* lock bit for synchronization */
|
||||
CIFS_INO_TMPFILE, /* for O_TMPFILE inodes */
|
||||
CIFS_INO_CLOSE_ON_LOCK, /* Not to defer the close when lock is set */
|
||||
};
|
||||
|
||||
struct cifsInodeInfo {
|
||||
struct netfs_inode netfs; /* Netfslib context and vfs inode */
|
||||
@@ -1554,13 +1561,6 @@ struct cifsInodeInfo {
|
||||
__u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
|
||||
unsigned int oplock; /* oplock/lease level we have */
|
||||
__u16 epoch; /* used to track lease state changes */
|
||||
#define CIFS_INODE_PENDING_OPLOCK_BREAK (0) /* oplock break in progress */
|
||||
#define CIFS_INODE_PENDING_WRITERS (1) /* Writes in progress */
|
||||
#define CIFS_INODE_FLAG_UNUSED (2) /* Unused flag */
|
||||
#define CIFS_INO_DELETE_PENDING (3) /* delete pending on server */
|
||||
#define CIFS_INO_INVALID_MAPPING (4) /* pagecache is invalid */
|
||||
#define CIFS_INO_LOCK (5) /* lock bit for synchronization */
|
||||
#define CIFS_INO_CLOSE_ON_LOCK (7) /* Not to defer the close when lock is set */
|
||||
unsigned long flags;
|
||||
spinlock_t writers_lock;
|
||||
unsigned int writers; /* Number of writers on this inode */
|
||||
@@ -2259,6 +2259,7 @@ struct smb2_compound_vars {
|
||||
struct kvec qi_iov;
|
||||
struct kvec io_iov[SMB2_IOCTL_IOV_SIZE];
|
||||
struct kvec si_iov[SMB2_SET_INFO_IOV_SIZE];
|
||||
struct kvec hl_iov[SMB2_SET_INFO_IOV_SIZE];
|
||||
struct kvec unlink_iov[SMB2_SET_INFO_IOV_SIZE];
|
||||
struct kvec rename_iov[SMB2_SET_INFO_IOV_SIZE];
|
||||
struct kvec close_iov;
|
||||
@@ -2383,6 +2384,8 @@ static inline int cifs_open_create_options(unsigned int oflags, int opts)
|
||||
opts |= CREATE_WRITE_THROUGH;
|
||||
if (oflags & O_DIRECT)
|
||||
opts |= CREATE_NO_BUFFER;
|
||||
if (oflags & O_TMPFILE)
|
||||
opts |= CREATE_DELETE_ON_CLOSE;
|
||||
return opts;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,8 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
|
||||
int __cifs_get_writable_file(struct cifsInodeInfo *cifs_inode,
|
||||
unsigned int find_flags, unsigned int open_flags,
|
||||
struct cifsFileInfo **ret_file);
|
||||
int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, int flags,
|
||||
int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name,
|
||||
struct inode *inode, int flags,
|
||||
struct cifsFileInfo **ret_file);
|
||||
struct cifsFileInfo *__find_readable_file(struct cifsInodeInfo *cifs_inode,
|
||||
unsigned int find_flags,
|
||||
|
||||
@@ -172,20 +172,44 @@ check_name(struct dentry *direntry, struct cifs_tcon *tcon)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *alloc_parent_path(struct dentry *dentry, size_t namelen)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dentry);
|
||||
void *page = alloc_dentry_path();
|
||||
const char *path;
|
||||
size_t size;
|
||||
char *npath;
|
||||
|
||||
path = build_path_from_dentry(dentry->d_parent, page);
|
||||
if (IS_ERR(path)) {
|
||||
npath = ERR_CAST(path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
size = strlen(path) + namelen + 2;
|
||||
npath = kmalloc(size, GFP_KERNEL);
|
||||
if (!npath)
|
||||
npath = ERR_PTR(-ENOMEM);
|
||||
else
|
||||
scnprintf(npath, size, "%s%c", path, CIFS_DIR_SEP(cifs_sb));
|
||||
out:
|
||||
free_dentry_path(page);
|
||||
return npath;
|
||||
}
|
||||
|
||||
/* Inode operations in similar order to how they appear in Linux file fs.h */
|
||||
|
||||
static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
|
||||
struct tcon_link *tlink, unsigned int oflags, umode_t mode, __u32 *oplock,
|
||||
struct cifs_fid *fid, struct cifs_open_info_data *buf)
|
||||
static int __cifs_do_create(struct inode *dir, struct dentry *direntry,
|
||||
const char *full_path, unsigned int xid,
|
||||
struct tcon_link *tlink, unsigned int oflags,
|
||||
umode_t mode, __u32 *oplock, struct cifs_fid *fid,
|
||||
struct cifs_open_info_data *buf,
|
||||
struct inode **inode)
|
||||
{
|
||||
int rc = -ENOENT;
|
||||
int create_options = CREATE_NOT_DIR;
|
||||
int desired_access;
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(inode);
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dir);
|
||||
struct cifs_tcon *tcon = tlink_tcon(tlink);
|
||||
const char *full_path;
|
||||
void *page = alloc_dentry_path();
|
||||
struct inode *newinode = NULL;
|
||||
unsigned int sbflags = cifs_sb_flags(cifs_sb);
|
||||
int disposition;
|
||||
@@ -195,25 +219,20 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
int rdwr_for_fscache = 0;
|
||||
__le32 lease_flags = 0;
|
||||
|
||||
*inode = NULL;
|
||||
*oplock = 0;
|
||||
if (tcon->ses->server->oplocks)
|
||||
*oplock = REQ_OPLOCK;
|
||||
|
||||
full_path = build_path_from_dentry(direntry, page);
|
||||
if (IS_ERR(full_path)) {
|
||||
rc = PTR_ERR(full_path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* If we're caching, we need to be able to fill in around partial writes. */
|
||||
if (cifs_fscache_enabled(inode) && (oflags & O_ACCMODE) == O_WRONLY)
|
||||
if (cifs_fscache_enabled(dir) && (oflags & O_ACCMODE) == O_WRONLY)
|
||||
rdwr_for_fscache = 1;
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
if (tcon->unix_ext && cap_unix(tcon->ses) && !tcon->broken_posix_open &&
|
||||
(CIFS_UNIX_POSIX_PATH_OPS_CAP &
|
||||
le64_to_cpu(tcon->fsUnixInfo.Capability))) {
|
||||
rc = cifs_posix_open(full_path, &newinode, inode->i_sb, mode,
|
||||
rc = cifs_posix_open(full_path, &newinode, dir->i_sb, mode,
|
||||
oflags, oplock, &fid->netfid, xid);
|
||||
switch (rc) {
|
||||
case 0:
|
||||
@@ -225,8 +244,7 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
if (S_ISDIR(newinode->i_mode)) {
|
||||
CIFSSMBClose(xid, tcon, fid->netfid);
|
||||
iput(newinode);
|
||||
rc = -EISDIR;
|
||||
goto out;
|
||||
return -EISDIR;
|
||||
}
|
||||
|
||||
if (!S_ISREG(newinode->i_mode)) {
|
||||
@@ -269,7 +287,7 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
break;
|
||||
|
||||
default:
|
||||
goto out;
|
||||
return rc;
|
||||
}
|
||||
/*
|
||||
* fallthrough to retry, using older open call, this is case
|
||||
@@ -287,26 +305,30 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
desired_access |= GENERIC_WRITE;
|
||||
if (rdwr_for_fscache == 1)
|
||||
desired_access |= GENERIC_READ;
|
||||
if (oflags & O_TMPFILE)
|
||||
desired_access |= DELETE;
|
||||
|
||||
disposition = FILE_OVERWRITE_IF;
|
||||
if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
|
||||
if (oflags & O_CREAT) {
|
||||
if (oflags & O_EXCL)
|
||||
disposition = FILE_CREATE;
|
||||
else if (oflags & O_TRUNC)
|
||||
disposition = FILE_OVERWRITE_IF;
|
||||
else
|
||||
disposition = FILE_OPEN_IF;
|
||||
} else if (oflags & O_TMPFILE) {
|
||||
disposition = FILE_CREATE;
|
||||
else if ((oflags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
|
||||
disposition = FILE_OVERWRITE_IF;
|
||||
else if ((oflags & O_CREAT) == O_CREAT)
|
||||
disposition = FILE_OPEN_IF;
|
||||
else
|
||||
} else {
|
||||
cifs_dbg(FYI, "Create flag not set in create function\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* BB add processing to set equivalent of mode - e.g. via CreateX with
|
||||
* ACLs
|
||||
*/
|
||||
|
||||
if (!server->ops->open) {
|
||||
rc = -ENOSYS;
|
||||
goto out;
|
||||
}
|
||||
if (!server->ops->open)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
create_options |= cifs_open_create_options(oflags, create_options);
|
||||
/*
|
||||
@@ -358,10 +380,10 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
rdwr_for_fscache = 2;
|
||||
goto retry_open;
|
||||
}
|
||||
goto out;
|
||||
return rc;
|
||||
}
|
||||
if (rdwr_for_fscache == 2)
|
||||
cifs_invalidate_cache(inode, FSCACHE_INVAL_DIO_WRITE);
|
||||
cifs_invalidate_cache(dir, FSCACHE_INVAL_DIO_WRITE);
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
/*
|
||||
@@ -379,8 +401,8 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
|
||||
if (sbflags & CIFS_MOUNT_SET_UID) {
|
||||
args.uid = current_fsuid();
|
||||
if (inode->i_mode & S_ISGID)
|
||||
args.gid = inode->i_gid;
|
||||
if (dir->i_mode & S_ISGID)
|
||||
args.gid = dir->i_gid;
|
||||
else
|
||||
args.gid = current_fsgid();
|
||||
} else {
|
||||
@@ -402,14 +424,14 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
cifs_create_get_file_info:
|
||||
/* server might mask mode so we have to query for it */
|
||||
if (tcon->unix_ext)
|
||||
rc = cifs_get_inode_info_unix(&newinode, full_path, inode->i_sb,
|
||||
rc = cifs_get_inode_info_unix(&newinode, full_path, dir->i_sb,
|
||||
xid);
|
||||
else {
|
||||
#else
|
||||
{
|
||||
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */
|
||||
/* TODO: Add support for calling POSIX query info here, but passing in fid */
|
||||
rc = cifs_get_inode_info(&newinode, full_path, buf, inode->i_sb, xid, fid);
|
||||
rc = cifs_get_inode_info(&newinode, full_path, buf, dir->i_sb, xid, fid);
|
||||
if (newinode) {
|
||||
if (server->ops->set_lease_key)
|
||||
server->ops->set_lease_key(newinode, fid);
|
||||
@@ -418,8 +440,8 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
newinode->i_mode = mode;
|
||||
if (sbflags & CIFS_MOUNT_SET_UID) {
|
||||
newinode->i_uid = current_fsuid();
|
||||
if (inode->i_mode & S_ISGID)
|
||||
newinode->i_gid = inode->i_gid;
|
||||
if (dir->i_mode & S_ISGID)
|
||||
newinode->i_gid = dir->i_gid;
|
||||
else
|
||||
newinode->i_gid = current_fsgid();
|
||||
}
|
||||
@@ -436,17 +458,12 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (newinode)
|
||||
if (S_ISDIR(newinode->i_mode)) {
|
||||
rc = -EISDIR;
|
||||
goto out_err;
|
||||
}
|
||||
if (newinode && S_ISDIR(newinode->i_mode)) {
|
||||
rc = -EISDIR;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
d_drop(direntry);
|
||||
d_add(direntry, newinode);
|
||||
|
||||
out:
|
||||
free_dentry_path(page);
|
||||
*inode = newinode;
|
||||
return rc;
|
||||
|
||||
out_err:
|
||||
@@ -454,14 +471,44 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
|
||||
server->ops->close(xid, tcon, fid);
|
||||
if (newinode)
|
||||
iput(newinode);
|
||||
goto out;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
struct file *file, unsigned int oflags, umode_t mode)
|
||||
static int cifs_do_create(struct inode *dir, struct dentry *direntry,
|
||||
unsigned int xid, struct tcon_link *tlink,
|
||||
unsigned int oflags, umode_t mode,
|
||||
__u32 *oplock, struct cifs_fid *fid,
|
||||
struct cifs_open_info_data *buf,
|
||||
struct inode **inode)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(inode);
|
||||
void *page = alloc_dentry_path();
|
||||
const char *full_path;
|
||||
int rc;
|
||||
|
||||
full_path = build_path_from_dentry(direntry, page);
|
||||
if (IS_ERR(full_path)) {
|
||||
rc = PTR_ERR(full_path);
|
||||
} else {
|
||||
rc = __cifs_do_create(dir, direntry, full_path, xid,
|
||||
tlink, oflags, mode, oplock,
|
||||
fid, buf, inode);
|
||||
}
|
||||
free_dentry_path(page);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Look up, create and open a CIFS file.
|
||||
*
|
||||
* The initial dentry state is in-lookup or hashed-negative. On success, dentry
|
||||
* will become hashed-positive by calling d_splice_alias() if in-lookup,
|
||||
* otherwise d_instantiate().
|
||||
*/
|
||||
int cifs_atomic_open(struct inode *dir, struct dentry *direntry,
|
||||
struct file *file, unsigned int oflags, umode_t mode)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dir);
|
||||
struct cifs_open_info_data buf = {};
|
||||
struct TCP_Server_Info *server;
|
||||
struct cifsFileInfo *file_info;
|
||||
@@ -470,6 +517,8 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
struct tcon_link *tlink;
|
||||
struct cifs_tcon *tcon;
|
||||
unsigned int sbflags;
|
||||
struct dentry *alias;
|
||||
struct inode *inode;
|
||||
unsigned int xid;
|
||||
__u32 oplock;
|
||||
int rc;
|
||||
@@ -496,13 +545,13 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
if (!d_in_lookup(direntry))
|
||||
return -ENOENT;
|
||||
|
||||
return finish_no_open(file, cifs_lookup(inode, direntry, 0));
|
||||
return finish_no_open(file, cifs_lookup(dir, direntry, 0));
|
||||
}
|
||||
|
||||
xid = get_xid();
|
||||
|
||||
cifs_dbg(FYI, "parent inode = 0x%p name is: %pd and dentry = 0x%p\n",
|
||||
inode, direntry, direntry);
|
||||
dir, direntry, direntry);
|
||||
|
||||
tlink = cifs_sb_tlink(cifs_sb);
|
||||
if (IS_ERR(tlink)) {
|
||||
@@ -523,13 +572,21 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
|
||||
cifs_add_pending_open(&fid, tlink, &open);
|
||||
|
||||
rc = cifs_do_create(inode, direntry, xid, tlink, oflags, mode,
|
||||
&oplock, &fid, &buf);
|
||||
rc = cifs_do_create(dir, direntry, xid, tlink, oflags, mode,
|
||||
&oplock, &fid, &buf, &inode);
|
||||
if (rc) {
|
||||
cifs_del_pending_open(&open);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (d_in_lookup(direntry)) {
|
||||
alias = d_splice_alias(inode, direntry);
|
||||
if (!IS_ERR_OR_NULL(alias))
|
||||
direntry = alias;
|
||||
} else {
|
||||
d_instantiate(direntry, inode);
|
||||
}
|
||||
|
||||
if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
|
||||
file->f_mode |= FMODE_CREATED;
|
||||
|
||||
@@ -569,9 +626,16 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
return rc;
|
||||
}
|
||||
|
||||
int cifs_create(struct mnt_idmap *idmap, struct inode *inode,
|
||||
/*
|
||||
* Create a CIFS file.
|
||||
*
|
||||
* The initial dentry state is hashed-negative. On success, dentry will become
|
||||
* hashed-positive by calling d_instantiate().
|
||||
*/
|
||||
int cifs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *direntry, umode_t mode, bool excl)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dir);
|
||||
int rc;
|
||||
unsigned int xid = get_xid();
|
||||
/*
|
||||
@@ -585,19 +649,20 @@ int cifs_create(struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct tcon_link *tlink;
|
||||
struct cifs_tcon *tcon;
|
||||
struct TCP_Server_Info *server;
|
||||
struct inode *inode;
|
||||
struct cifs_fid fid;
|
||||
__u32 oplock;
|
||||
struct cifs_open_info_data buf = {};
|
||||
|
||||
cifs_dbg(FYI, "cifs_create parent inode = 0x%p name is: %pd and dentry = 0x%p\n",
|
||||
inode, direntry, direntry);
|
||||
dir, direntry, direntry);
|
||||
|
||||
if (unlikely(cifs_forced_shutdown(CIFS_SB(inode->i_sb)))) {
|
||||
if (unlikely(cifs_forced_shutdown(cifs_sb))) {
|
||||
rc = smb_EIO(smb_eio_trace_forced_shutdown);
|
||||
goto out_free_xid;
|
||||
}
|
||||
|
||||
tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
|
||||
tlink = cifs_sb_tlink(cifs_sb);
|
||||
rc = PTR_ERR(tlink);
|
||||
if (IS_ERR(tlink))
|
||||
goto out_free_xid;
|
||||
@@ -608,9 +673,13 @@ int cifs_create(struct mnt_idmap *idmap, struct inode *inode,
|
||||
if (server->ops->new_lease_key)
|
||||
server->ops->new_lease_key(&fid);
|
||||
|
||||
rc = cifs_do_create(inode, direntry, xid, tlink, oflags, mode, &oplock, &fid, &buf);
|
||||
if (!rc && server->ops->close)
|
||||
server->ops->close(xid, tcon, &fid);
|
||||
rc = cifs_do_create(dir, direntry, xid, tlink, oflags,
|
||||
mode, &oplock, &fid, &buf, &inode);
|
||||
if (!rc) {
|
||||
d_instantiate(direntry, inode);
|
||||
if (server->ops->close)
|
||||
server->ops->close(xid, tcon, &fid);
|
||||
}
|
||||
|
||||
cifs_free_open_info(&buf);
|
||||
cifs_put_tlink(tlink);
|
||||
@@ -959,6 +1028,165 @@ static int cifs_ci_compare(const struct dentry *dentry,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_tmpfile_attr(const unsigned int xid, unsigned int oflags,
|
||||
struct inode *inode, const char *full_path,
|
||||
struct TCP_Server_Info *server)
|
||||
{
|
||||
struct cifsInodeInfo *cinode = CIFS_I(inode);
|
||||
FILE_BASIC_INFO fi;
|
||||
|
||||
cinode->cifsAttrs |= ATTR_HIDDEN;
|
||||
if (oflags & O_EXCL)
|
||||
cinode->cifsAttrs |= ATTR_TEMPORARY;
|
||||
|
||||
fi = (FILE_BASIC_INFO) {
|
||||
.Attributes = cpu_to_le32(cinode->cifsAttrs),
|
||||
};
|
||||
return server->ops->set_file_info(inode, full_path, &fi, xid);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a hidden temporary CIFS file with delete-on-close bit set.
|
||||
*
|
||||
* The initial dentry state is unhashed-negative. On success, dentry will
|
||||
* become unhashed-positive by calling d_instantiate().
|
||||
*/
|
||||
int cifs_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode)
|
||||
{
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dir);
|
||||
char *path __free(kfree) = NULL, *name;
|
||||
unsigned int oflags = file->f_flags;
|
||||
size_t size = CIFS_TMPNAME_LEN + 1;
|
||||
int retries = 0, max_retries = 16;
|
||||
struct TCP_Server_Info *server;
|
||||
struct cifs_pending_open open;
|
||||
struct cifsFileInfo *cfile;
|
||||
struct cifs_fid fid = {};
|
||||
struct tcon_link *tlink;
|
||||
struct cifs_tcon *tcon;
|
||||
unsigned int sbflags;
|
||||
struct inode *inode;
|
||||
unsigned int xid;
|
||||
__u32 oplock;
|
||||
int rc;
|
||||
|
||||
if (unlikely(cifs_forced_shutdown(cifs_sb)))
|
||||
return smb_EIO(smb_eio_trace_forced_shutdown);
|
||||
|
||||
tlink = cifs_sb_tlink(cifs_sb);
|
||||
if (IS_ERR(tlink))
|
||||
return PTR_ERR(tlink);
|
||||
tcon = tlink_tcon(tlink);
|
||||
server = tcon->ses->server;
|
||||
|
||||
xid = get_xid();
|
||||
|
||||
if (server->vals->protocol_id < SMB20_PROT_ID) {
|
||||
cifs_dbg(VFS | ONCE, "O_TMPFILE is supported only in SMB2+\n");
|
||||
rc = -EOPNOTSUPP;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (server->ops->new_lease_key)
|
||||
server->ops->new_lease_key(&fid);
|
||||
cifs_add_pending_open(&fid, tlink, &open);
|
||||
|
||||
path = alloc_parent_path(dentry, size - 1);
|
||||
if (IS_ERR(path)) {
|
||||
cifs_del_pending_open(&open);
|
||||
rc = PTR_ERR(path);
|
||||
path = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
name = path + strlen(path);
|
||||
do {
|
||||
scnprintf(name, size,
|
||||
CIFS_TMPNAME_PREFIX "%0*x",
|
||||
CIFS_TMPNAME_COUNTER_LEN,
|
||||
atomic_inc_return(&cifs_tmpcounter));
|
||||
rc = __cifs_do_create(dir, dentry, path, xid, tlink, oflags,
|
||||
mode, &oplock, &fid, NULL, &inode);
|
||||
if (!rc) {
|
||||
set_nlink(inode, 0);
|
||||
mark_inode_dirty(inode);
|
||||
d_mark_tmpfile_name(file, &QSTR_LEN(name, size - 1));
|
||||
d_instantiate(dentry, inode);
|
||||
break;
|
||||
}
|
||||
} while (unlikely(rc == -EEXIST) && ++retries < max_retries);
|
||||
|
||||
if (rc) {
|
||||
cifs_del_pending_open(&open);
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = finish_open(file, dentry, generic_file_open);
|
||||
if (rc)
|
||||
goto err_open;
|
||||
|
||||
sbflags = cifs_sb_flags(cifs_sb);
|
||||
if ((file->f_flags & O_DIRECT) && (sbflags & CIFS_MOUNT_STRICT_IO)) {
|
||||
if (sbflags & CIFS_MOUNT_NO_BRL)
|
||||
file->f_op = &cifs_file_direct_nobrl_ops;
|
||||
else
|
||||
file->f_op = &cifs_file_direct_ops;
|
||||
}
|
||||
|
||||
cfile = cifs_new_fileinfo(&fid, file, tlink, oplock, NULL);
|
||||
if (!cfile) {
|
||||
rc = -ENOMEM;
|
||||
goto err_open;
|
||||
}
|
||||
|
||||
rc = set_tmpfile_attr(xid, oflags, inode, path, server);
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
fscache_use_cookie(cifs_inode_cookie(file_inode(file)),
|
||||
file->f_mode & FMODE_WRITE);
|
||||
out:
|
||||
cifs_put_tlink(tlink);
|
||||
free_xid(xid);
|
||||
return rc;
|
||||
err_open:
|
||||
cifs_del_pending_open(&open);
|
||||
if (server->ops->close)
|
||||
server->ops->close(xid, tcon, &fid);
|
||||
goto out;
|
||||
}
|
||||
|
||||
char *cifs_silly_fullpath(struct dentry *dentry)
|
||||
{
|
||||
unsigned char name[CIFS_SILLYNAME_LEN + 1];
|
||||
int retries = 0, max_retries = 16;
|
||||
size_t namesize = sizeof(name);
|
||||
struct dentry *sdentry = NULL;
|
||||
char *path;
|
||||
|
||||
do {
|
||||
dput(sdentry);
|
||||
scnprintf(name, namesize,
|
||||
CIFS_SILLYNAME_PREFIX "%0*x",
|
||||
CIFS_SILLYNAME_COUNTER_LEN,
|
||||
atomic_inc_return(&cifs_sillycounter));
|
||||
sdentry = lookup_noperm(&QSTR(name), dentry->d_parent);
|
||||
if (IS_ERR(sdentry))
|
||||
return ERR_CAST(sdentry);
|
||||
if (d_is_negative(sdentry)) {
|
||||
dput(sdentry);
|
||||
path = alloc_parent_path(dentry, CIFS_SILLYNAME_LEN);
|
||||
if (!IS_ERR(path))
|
||||
strcat(path, name);
|
||||
return path;
|
||||
}
|
||||
} while (++retries < max_retries);
|
||||
dput(sdentry);
|
||||
return ERR_PTR(-EBUSY);
|
||||
}
|
||||
|
||||
const struct dentry_operations cifs_ci_dentry_ops = {
|
||||
.d_revalidate = cifs_d_revalidate,
|
||||
.d_hash = cifs_ci_hash,
|
||||
|
||||
@@ -406,22 +406,29 @@ cifs_mark_open_files_invalid(struct cifs_tcon *tcon)
|
||||
*/
|
||||
}
|
||||
|
||||
static inline int cifs_convert_flags(unsigned int flags, int rdwr_for_fscache)
|
||||
static inline int cifs_convert_flags(unsigned int oflags, int rdwr_for_fscache)
|
||||
{
|
||||
if ((flags & O_ACCMODE) == O_RDONLY)
|
||||
return GENERIC_READ;
|
||||
else if ((flags & O_ACCMODE) == O_WRONLY)
|
||||
return rdwr_for_fscache == 1 ? (GENERIC_READ | GENERIC_WRITE) : GENERIC_WRITE;
|
||||
else if ((flags & O_ACCMODE) == O_RDWR) {
|
||||
int flags = 0;
|
||||
|
||||
if (oflags & O_TMPFILE)
|
||||
flags |= DELETE;
|
||||
|
||||
if ((oflags & O_ACCMODE) == O_RDONLY)
|
||||
return flags | GENERIC_READ;
|
||||
if ((oflags & O_ACCMODE) == O_WRONLY) {
|
||||
return flags | (rdwr_for_fscache == 1 ?
|
||||
(GENERIC_READ | GENERIC_WRITE) : GENERIC_WRITE);
|
||||
}
|
||||
if ((oflags & O_ACCMODE) == O_RDWR) {
|
||||
/* GENERIC_ALL is too much permission to request
|
||||
can cause unnecessary access denied on create */
|
||||
/* return GENERIC_ALL; */
|
||||
return (GENERIC_READ | GENERIC_WRITE);
|
||||
return flags | GENERIC_READ | GENERIC_WRITE;
|
||||
}
|
||||
|
||||
return (READ_CONTROL | FILE_WRITE_ATTRIBUTES | FILE_READ_ATTRIBUTES |
|
||||
FILE_WRITE_EA | FILE_APPEND_DATA | FILE_WRITE_DATA |
|
||||
FILE_READ_DATA);
|
||||
return flags | READ_CONTROL | FILE_WRITE_ATTRIBUTES |
|
||||
FILE_READ_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA |
|
||||
FILE_WRITE_DATA | FILE_READ_DATA;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
@@ -696,6 +703,7 @@ struct cifsFileInfo *cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
|
||||
cfile->f_flags = file->f_flags;
|
||||
cfile->invalidHandle = false;
|
||||
cfile->deferred_close_scheduled = false;
|
||||
cfile->status_file_deleted = file->f_flags & O_TMPFILE;
|
||||
cfile->tlink = cifs_get_tlink(tlink);
|
||||
INIT_WORK(&cfile->oplock_break, cifs_oplock_break);
|
||||
INIT_WORK(&cfile->put, cifsFileInfo_put_work);
|
||||
@@ -727,6 +735,8 @@ struct cifsFileInfo *cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
|
||||
|
||||
/* if readable file instance put first in list*/
|
||||
spin_lock(&cinode->open_file_lock);
|
||||
if (file->f_flags & O_TMPFILE)
|
||||
set_bit(CIFS_INO_TMPFILE, &cinode->flags);
|
||||
fid->purge_cache = false;
|
||||
server->ops->set_fid(cfile, fid, oplock);
|
||||
|
||||
@@ -2578,13 +2588,12 @@ int __cifs_get_writable_file(struct cifsInodeInfo *cifs_inode,
|
||||
struct cifsFileInfo **ret_file)
|
||||
{
|
||||
struct cifsFileInfo *open_file, *inv_file = NULL;
|
||||
bool fsuid_only, with_delete;
|
||||
struct cifs_sb_info *cifs_sb;
|
||||
bool any_available = false;
|
||||
int rc = -EBADF;
|
||||
unsigned int refind = 0;
|
||||
bool fsuid_only = find_flags & FIND_FSUID_ONLY;
|
||||
bool with_delete = find_flags & FIND_WITH_DELETE;
|
||||
*ret_file = NULL;
|
||||
int rc = -EBADF;
|
||||
|
||||
/*
|
||||
* Having a null inode here (because mapping->host was set to zero by
|
||||
@@ -2598,8 +2607,13 @@ int __cifs_get_writable_file(struct cifsInodeInfo *cifs_inode,
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (test_bit(CIFS_INO_TMPFILE, &cifs_inode->flags))
|
||||
find_flags = FIND_ANY;
|
||||
|
||||
cifs_sb = CIFS_SB(cifs_inode);
|
||||
|
||||
with_delete = find_flags & FIND_WITH_DELETE;
|
||||
fsuid_only = find_flags & FIND_FSUID_ONLY;
|
||||
/* only filter by fsuid on multiuser mounts */
|
||||
if (!(cifs_sb_flags(cifs_sb) & CIFS_MOUNT_MULTIUSER))
|
||||
fsuid_only = false;
|
||||
@@ -2683,16 +2697,19 @@ find_writable_file(struct cifsInodeInfo *cifs_inode, int flags)
|
||||
return cfile;
|
||||
}
|
||||
|
||||
int
|
||||
cifs_get_writable_path(struct cifs_tcon *tcon, const char *name,
|
||||
int flags,
|
||||
struct cifsFileInfo **ret_file)
|
||||
int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name,
|
||||
struct inode *inode, int flags,
|
||||
struct cifsFileInfo **ret_file)
|
||||
{
|
||||
struct cifsFileInfo *cfile;
|
||||
void *page = alloc_dentry_path();
|
||||
void *page;
|
||||
|
||||
*ret_file = NULL;
|
||||
|
||||
if (inode)
|
||||
return cifs_get_writable_file(CIFS_I(inode), flags, ret_file);
|
||||
|
||||
page = alloc_dentry_path();
|
||||
spin_lock(&tcon->open_file_lock);
|
||||
list_for_each_entry(cfile, &tcon->openFileList, tlist) {
|
||||
struct cifsInodeInfo *cinode;
|
||||
|
||||
@@ -80,7 +80,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
|
||||
fsparam_flag_no("forcegid", Opt_forcegid),
|
||||
fsparam_flag("noblocksend", Opt_noblocksend),
|
||||
fsparam_flag("noautotune", Opt_noautotune),
|
||||
fsparam_flag("nolease", Opt_nolease),
|
||||
fsparam_flag_no("lease", Opt_lease),
|
||||
fsparam_flag_no("hard", Opt_hard),
|
||||
fsparam_flag_no("soft", Opt_soft),
|
||||
fsparam_flag_no("perm", Opt_perm),
|
||||
@@ -662,13 +662,17 @@ smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx)
|
||||
|
||||
/* make sure we have a valid UNC double delimiter prefix */
|
||||
len = strspn(devname, delims);
|
||||
if (len != 2)
|
||||
if (len != 2) {
|
||||
cifs_dbg(VFS, "UNC: path must begin with // or \\\\\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* find delimiter between host and sharename */
|
||||
pos = strpbrk(devname + 2, delims);
|
||||
if (!pos)
|
||||
if (!pos) {
|
||||
cifs_dbg(VFS, "UNC: missing delimiter between hostname and share name\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* record the server hostname */
|
||||
kfree(ctx->server_hostname);
|
||||
@@ -681,8 +685,10 @@ smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx)
|
||||
|
||||
/* now go until next delimiter or end of string */
|
||||
len = strcspn(pos, delims);
|
||||
if (!len)
|
||||
if (!len) {
|
||||
cifs_dbg(VFS, "UNC: missing share name\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* move "pos" up to delimiter or NULL */
|
||||
pos += len;
|
||||
@@ -1334,8 +1340,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
|
||||
case Opt_noautotune:
|
||||
ctx->noautotune = 1;
|
||||
break;
|
||||
case Opt_nolease:
|
||||
ctx->no_lease = 1;
|
||||
case Opt_lease:
|
||||
ctx->no_lease = result.negated;
|
||||
break;
|
||||
case Opt_nosparse:
|
||||
ctx->no_sparse = 1;
|
||||
|
||||
@@ -102,7 +102,7 @@ enum cifs_param {
|
||||
Opt_forcegid,
|
||||
Opt_noblocksend,
|
||||
Opt_noautotune,
|
||||
Opt_nolease,
|
||||
Opt_lease,
|
||||
Opt_nosparse,
|
||||
Opt_hard,
|
||||
Opt_soft,
|
||||
|
||||
124
fs/smb/client/gen_smb1_mapping
Normal file
124
fs/smb/client/gen_smb1_mapping
Normal file
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/perl -w
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# Script to generate SMB1 error mapping tables.
|
||||
#
|
||||
# Copyright (C) 2026 KylinSoft Co., Ltd. All rights reserved.
|
||||
# Author(s): Huiwen He <hehuiwen@kylinos.cn>
|
||||
# ChenXiaoSong <chenxiaosong@kylinos.cn>
|
||||
#
|
||||
use strict;
|
||||
|
||||
if ($#ARGV != 1) {
|
||||
print STDERR "Usage: $0 <in-file> <out-file>\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
# Parse input parameters and extract filenames
|
||||
my $in_file = $ARGV[0];
|
||||
my $out_file = $ARGV[1];
|
||||
my $input_name = (split m|/|, $in_file)[-1];
|
||||
my $output_name = (split m|/|, $out_file)[-1];
|
||||
my $script_name = (split m|/|, $0)[-1];
|
||||
my @list = ();
|
||||
my %seen = ();
|
||||
my $current_class = "";
|
||||
|
||||
# Parse annotated entries from the input file
|
||||
open(my $in, "<", $in_file) or die "Cannot open $in_file: $!";
|
||||
if ($in_file =~ /nterr\.h$/) {
|
||||
while (<$in>) {
|
||||
# Handle backslash line continuation
|
||||
$_ .= <$in> while s/\\\s*\n//;
|
||||
|
||||
# Match #define NT_STATUS_... followed by // CLASS, CODE or /* CLASS, CODE */
|
||||
my $re = qr{^\s*#define\s+(NT_STATUS_[A-Za-z0-9_]+)\s+(.+?)\s*} .
|
||||
qr{(?://\s*|/\*\s*)([A-Z0-9_]+)\s*,\s*([A-Za-z0-9_]+)};
|
||||
|
||||
if (/$re/) {
|
||||
my ($name, $val_str, $class, $code) = ($1, $2, $3, $4);
|
||||
|
||||
# Skip duplicate macro names
|
||||
next if $seen{$name}++;
|
||||
|
||||
# Clean up value string (remove parens, spaces)
|
||||
$val_str =~ s/[\s\(\)]//g;
|
||||
my $val = 0;
|
||||
foreach my $part (split(/\|/, $val_str)) {
|
||||
$val |= hex($part);
|
||||
}
|
||||
push @list, { val => $val, name => $name, class => $class, code => $code };
|
||||
} elsif (/^\s*#define\s+NT_STATUS_.*(?:\/\/|\/\*)/) {
|
||||
# Error if macro has a comment (// or /*) but fails mapping format
|
||||
die "Error: Invalid mapping comment format in $in_file: $_";
|
||||
}
|
||||
}
|
||||
} elsif ($in_file =~ /smberr\.h$/) {
|
||||
while (<$in>) {
|
||||
# Handle backslash line continuation
|
||||
$_ .= <$in> while s/\\\s*\n//;
|
||||
|
||||
# Detect current error class from header comments (ERRDOS or ERRSRV)
|
||||
if (/generated with the (\w+) error class/) {
|
||||
$current_class = $1;
|
||||
}
|
||||
|
||||
# Match #define ERR/Err_... <value> followed by // -POSIX_ERR or /* -POSIX_ERR */
|
||||
if (/^\s*#define\s+((?:ERR|Err)[A-Za-z0-9_]+)\s+([0-9a-fA-FxX]+)\s*(?:\/\/|\/\*)\s*(-[A-Z0-9_]+)/) {
|
||||
my ($name, $val_str, $error) = ($1, $2, $3);
|
||||
my $val = ($val_str =~ /^0x/i) ? hex($val_str) : $val_str;
|
||||
push @list, { val => $val, name => $name, error => $error, class => $current_class };
|
||||
} elsif ($current_class && /^\s*#define\s+(?:ERR|Err).*?(?:\/\/|\/\*)/) {
|
||||
# Error if macro has a comment (// or /*) but fails mapping format
|
||||
die "Error: Invalid mapping comment format in $in_file: $_";
|
||||
}
|
||||
}
|
||||
}
|
||||
close($in);
|
||||
|
||||
# Fail if no entries were found to avoid broken builds
|
||||
die "Error: No mapping entries found in $in_file\n" unless @list;
|
||||
|
||||
# Sort entries numerically by value
|
||||
@list = sort { $a->{val} <=> $b->{val} } @list;
|
||||
|
||||
# Generate the C mapping table output file
|
||||
open(my $out, ">", $out_file) or die "Cannot open $out_file: $!";
|
||||
print $out "/* Autogenerated from $input_name by $script_name */\n\n";
|
||||
|
||||
if ($output_name eq "smb1_mapping_table.c") {
|
||||
# Generate NT status -> DOS error mapping file
|
||||
|
||||
my $count = scalar @list;
|
||||
my $full_names = "";
|
||||
|
||||
for (my $i = 0; $i < $count; $i++) {
|
||||
my $e = $list[$i];
|
||||
my $val = $e->{val};
|
||||
|
||||
$full_names .= $e->{name};
|
||||
|
||||
# Merge synonyms
|
||||
if ($i < $count - 1 && $list[$i + 1]->{val} == $val) {
|
||||
$full_names .= " or ";
|
||||
next;
|
||||
}
|
||||
|
||||
printf $out "\t{ %s, %s, 0x%08x, \"%s\" },\n", $e->{class}, $e->{code}, $val, $full_names;
|
||||
|
||||
$full_names = "";
|
||||
}
|
||||
} elsif ($output_name eq "smb1_err_dos_map.c" || $output_name eq "smb1_err_srv_map.c") {
|
||||
# Generate SMB1 error -> POSIX error mapping file
|
||||
|
||||
# Filtered by exact output filename
|
||||
my $filter = ($output_name eq "smb1_err_dos_map.c") ? "ERRDOS" : "ERRSRV";
|
||||
foreach my $e (@list) {
|
||||
if (!$filter || $e->{class} eq $filter) {
|
||||
printf $out "\t{%s, %s},\n", $e->{name}, $e->{error};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
die "Error: Unsupported output target: $output_name\n";
|
||||
}
|
||||
close($out);
|
||||
@@ -2690,7 +2690,8 @@ cifs_dentry_needs_reval(struct dentry *dentry)
|
||||
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
|
||||
struct cached_fid *cfid = NULL;
|
||||
|
||||
if (test_bit(CIFS_INO_DELETE_PENDING, &cifs_i->flags))
|
||||
if (test_bit(CIFS_INO_DELETE_PENDING, &cifs_i->flags) ||
|
||||
test_bit(CIFS_INO_TMPFILE, &cifs_i->flags))
|
||||
return false;
|
||||
if (cifs_i->time == 0)
|
||||
return true;
|
||||
|
||||
@@ -503,6 +503,7 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
|
||||
if (d_really_is_positive(old_file)) {
|
||||
cifsInode = CIFS_I(d_inode(old_file));
|
||||
if (rc == 0) {
|
||||
clear_bit(CIFS_INO_TMPFILE, &cifsInode->flags);
|
||||
spin_lock(&d_inode(old_file)->i_lock);
|
||||
inc_nlink(d_inode(old_file));
|
||||
spin_unlock(&d_inode(old_file)->i_lock);
|
||||
|
||||
@@ -1,704 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Unix SMB/Netbios implementation.
|
||||
* Version 1.9.
|
||||
* RPC Pipe client / server routines
|
||||
* Copyright (C) Luke Kenneth Casson Leighton 1997-2001.
|
||||
*/
|
||||
|
||||
/* NT error codes - see nterr.h */
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include "nterr.h"
|
||||
|
||||
const struct nt_err_code_struct nt_errs[] = {
|
||||
{"NT_STATUS_OK", NT_STATUS_OK},
|
||||
{"NT_STATUS_PENDING", NT_STATUS_PENDING},
|
||||
{"NT_STATUS_NOTIFY_ENUM_DIR", NT_STATUS_NOTIFY_ENUM_DIR},
|
||||
{"NT_STATUS_MEDIA_CHANGED", NT_STATUS_MEDIA_CHANGED},
|
||||
{"NT_STATUS_END_OF_MEDIA", NT_STATUS_END_OF_MEDIA},
|
||||
{"NT_STATUS_MEDIA_CHECK", NT_STATUS_MEDIA_CHECK},
|
||||
{"NT_STATUS_NO_DATA_DETECTED", NT_STATUS_NO_DATA_DETECTED},
|
||||
{"NT_STATUS_STOPPED_ON_SYMLINK", NT_STATUS_STOPPED_ON_SYMLINK},
|
||||
{"NT_STATUS_DEVICE_REQUIRES_CLEANING", NT_STATUS_DEVICE_REQUIRES_CLEANING},
|
||||
{"NT_STATUS_DEVICE_DOOR_OPEN", NT_STATUS_DEVICE_DOOR_OPEN},
|
||||
{"NT_STATUS_UNSUCCESSFUL", NT_STATUS_UNSUCCESSFUL},
|
||||
{"NT_STATUS_NOT_IMPLEMENTED", NT_STATUS_NOT_IMPLEMENTED},
|
||||
{"NT_STATUS_INVALID_INFO_CLASS", NT_STATUS_INVALID_INFO_CLASS},
|
||||
{"NT_STATUS_INFO_LENGTH_MISMATCH", NT_STATUS_INFO_LENGTH_MISMATCH},
|
||||
{"NT_STATUS_ACCESS_VIOLATION", NT_STATUS_ACCESS_VIOLATION},
|
||||
{"NT_STATUS_BUFFER_OVERFLOW", NT_STATUS_BUFFER_OVERFLOW},
|
||||
{"NT_STATUS_IN_PAGE_ERROR", NT_STATUS_IN_PAGE_ERROR},
|
||||
{"NT_STATUS_PAGEFILE_QUOTA", NT_STATUS_PAGEFILE_QUOTA},
|
||||
{"NT_STATUS_INVALID_HANDLE", NT_STATUS_INVALID_HANDLE},
|
||||
{"NT_STATUS_BAD_INITIAL_STACK", NT_STATUS_BAD_INITIAL_STACK},
|
||||
{"NT_STATUS_BAD_INITIAL_PC", NT_STATUS_BAD_INITIAL_PC},
|
||||
{"NT_STATUS_INVALID_CID", NT_STATUS_INVALID_CID},
|
||||
{"NT_STATUS_TIMER_NOT_CANCELED", NT_STATUS_TIMER_NOT_CANCELED},
|
||||
{"NT_STATUS_INVALID_PARAMETER", NT_STATUS_INVALID_PARAMETER},
|
||||
{"NT_STATUS_NO_SUCH_DEVICE", NT_STATUS_NO_SUCH_DEVICE},
|
||||
{"NT_STATUS_NO_SUCH_FILE", NT_STATUS_NO_SUCH_FILE},
|
||||
{"NT_STATUS_INVALID_DEVICE_REQUEST",
|
||||
NT_STATUS_INVALID_DEVICE_REQUEST},
|
||||
{"NT_STATUS_END_OF_FILE", NT_STATUS_END_OF_FILE},
|
||||
{"NT_STATUS_WRONG_VOLUME", NT_STATUS_WRONG_VOLUME},
|
||||
{"NT_STATUS_NO_MEDIA_IN_DEVICE", NT_STATUS_NO_MEDIA_IN_DEVICE},
|
||||
{"NT_STATUS_UNRECOGNIZED_MEDIA", NT_STATUS_UNRECOGNIZED_MEDIA},
|
||||
{"NT_STATUS_NONEXISTENT_SECTOR", NT_STATUS_NONEXISTENT_SECTOR},
|
||||
{"NT_STATUS_MORE_PROCESSING_REQUIRED",
|
||||
NT_STATUS_MORE_PROCESSING_REQUIRED},
|
||||
{"NT_STATUS_NO_MEMORY", NT_STATUS_NO_MEMORY},
|
||||
{"NT_STATUS_CONFLICTING_ADDRESSES",
|
||||
NT_STATUS_CONFLICTING_ADDRESSES},
|
||||
{"NT_STATUS_NOT_MAPPED_VIEW", NT_STATUS_NOT_MAPPED_VIEW},
|
||||
{"NT_STATUS_UNABLE_TO_FREE_VM", NT_STATUS_UNABLE_TO_FREE_VM},
|
||||
{"NT_STATUS_UNABLE_TO_DELETE_SECTION",
|
||||
NT_STATUS_UNABLE_TO_DELETE_SECTION},
|
||||
{"NT_STATUS_INVALID_SYSTEM_SERVICE",
|
||||
NT_STATUS_INVALID_SYSTEM_SERVICE},
|
||||
{"NT_STATUS_ILLEGAL_INSTRUCTION", NT_STATUS_ILLEGAL_INSTRUCTION},
|
||||
{"NT_STATUS_INVALID_LOCK_SEQUENCE",
|
||||
NT_STATUS_INVALID_LOCK_SEQUENCE},
|
||||
{"NT_STATUS_INVALID_VIEW_SIZE", NT_STATUS_INVALID_VIEW_SIZE},
|
||||
{"NT_STATUS_INVALID_FILE_FOR_SECTION",
|
||||
NT_STATUS_INVALID_FILE_FOR_SECTION},
|
||||
{"NT_STATUS_ALREADY_COMMITTED", NT_STATUS_ALREADY_COMMITTED},
|
||||
{"NT_STATUS_ACCESS_DENIED", NT_STATUS_ACCESS_DENIED},
|
||||
{"NT_STATUS_BUFFER_TOO_SMALL", NT_STATUS_BUFFER_TOO_SMALL},
|
||||
{"NT_STATUS_OBJECT_TYPE_MISMATCH", NT_STATUS_OBJECT_TYPE_MISMATCH},
|
||||
{"NT_STATUS_NONCONTINUABLE_EXCEPTION",
|
||||
NT_STATUS_NONCONTINUABLE_EXCEPTION},
|
||||
{"NT_STATUS_INVALID_DISPOSITION", NT_STATUS_INVALID_DISPOSITION},
|
||||
{"NT_STATUS_UNWIND", NT_STATUS_UNWIND},
|
||||
{"NT_STATUS_BAD_STACK", NT_STATUS_BAD_STACK},
|
||||
{"NT_STATUS_INVALID_UNWIND_TARGET",
|
||||
NT_STATUS_INVALID_UNWIND_TARGET},
|
||||
{"NT_STATUS_NOT_LOCKED", NT_STATUS_NOT_LOCKED},
|
||||
{"NT_STATUS_PARITY_ERROR", NT_STATUS_PARITY_ERROR},
|
||||
{"NT_STATUS_UNABLE_TO_DECOMMIT_VM",
|
||||
NT_STATUS_UNABLE_TO_DECOMMIT_VM},
|
||||
{"NT_STATUS_NOT_COMMITTED", NT_STATUS_NOT_COMMITTED},
|
||||
{"NT_STATUS_INVALID_PORT_ATTRIBUTES",
|
||||
NT_STATUS_INVALID_PORT_ATTRIBUTES},
|
||||
{"NT_STATUS_PORT_MESSAGE_TOO_LONG",
|
||||
NT_STATUS_PORT_MESSAGE_TOO_LONG},
|
||||
{"NT_STATUS_INVALID_PARAMETER_MIX",
|
||||
NT_STATUS_INVALID_PARAMETER_MIX},
|
||||
{"NT_STATUS_INVALID_QUOTA_LOWER", NT_STATUS_INVALID_QUOTA_LOWER},
|
||||
{"NT_STATUS_DISK_CORRUPT_ERROR", NT_STATUS_DISK_CORRUPT_ERROR},
|
||||
{"NT_STATUS_OBJECT_NAME_INVALID", NT_STATUS_OBJECT_NAME_INVALID},
|
||||
{"NT_STATUS_OBJECT_NAME_NOT_FOUND",
|
||||
NT_STATUS_OBJECT_NAME_NOT_FOUND},
|
||||
{"NT_STATUS_OBJECT_NAME_COLLISION",
|
||||
NT_STATUS_OBJECT_NAME_COLLISION},
|
||||
{"NT_STATUS_HANDLE_NOT_WAITABLE", NT_STATUS_HANDLE_NOT_WAITABLE},
|
||||
{"NT_STATUS_PORT_DISCONNECTED", NT_STATUS_PORT_DISCONNECTED},
|
||||
{"NT_STATUS_DEVICE_ALREADY_ATTACHED",
|
||||
NT_STATUS_DEVICE_ALREADY_ATTACHED},
|
||||
{"NT_STATUS_OBJECT_PATH_INVALID", NT_STATUS_OBJECT_PATH_INVALID},
|
||||
{"NT_STATUS_OBJECT_PATH_NOT_FOUND",
|
||||
NT_STATUS_OBJECT_PATH_NOT_FOUND},
|
||||
{"NT_STATUS_OBJECT_PATH_SYNTAX_BAD",
|
||||
NT_STATUS_OBJECT_PATH_SYNTAX_BAD},
|
||||
{"NT_STATUS_DATA_OVERRUN", NT_STATUS_DATA_OVERRUN},
|
||||
{"NT_STATUS_DATA_LATE_ERROR", NT_STATUS_DATA_LATE_ERROR},
|
||||
{"NT_STATUS_DATA_ERROR", NT_STATUS_DATA_ERROR},
|
||||
{"NT_STATUS_CRC_ERROR", NT_STATUS_CRC_ERROR},
|
||||
{"NT_STATUS_SECTION_TOO_BIG", NT_STATUS_SECTION_TOO_BIG},
|
||||
{"NT_STATUS_PORT_CONNECTION_REFUSED",
|
||||
NT_STATUS_PORT_CONNECTION_REFUSED},
|
||||
{"NT_STATUS_INVALID_PORT_HANDLE", NT_STATUS_INVALID_PORT_HANDLE},
|
||||
{"NT_STATUS_SHARING_VIOLATION", NT_STATUS_SHARING_VIOLATION},
|
||||
{"NT_STATUS_QUOTA_EXCEEDED", NT_STATUS_QUOTA_EXCEEDED},
|
||||
{"NT_STATUS_INVALID_PAGE_PROTECTION",
|
||||
NT_STATUS_INVALID_PAGE_PROTECTION},
|
||||
{"NT_STATUS_MUTANT_NOT_OWNED", NT_STATUS_MUTANT_NOT_OWNED},
|
||||
{"NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED",
|
||||
NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED},
|
||||
{"NT_STATUS_PORT_ALREADY_SET", NT_STATUS_PORT_ALREADY_SET},
|
||||
{"NT_STATUS_SECTION_NOT_IMAGE", NT_STATUS_SECTION_NOT_IMAGE},
|
||||
{"NT_STATUS_SUSPEND_COUNT_EXCEEDED",
|
||||
NT_STATUS_SUSPEND_COUNT_EXCEEDED},
|
||||
{"NT_STATUS_THREAD_IS_TERMINATING",
|
||||
NT_STATUS_THREAD_IS_TERMINATING},
|
||||
{"NT_STATUS_BAD_WORKING_SET_LIMIT",
|
||||
NT_STATUS_BAD_WORKING_SET_LIMIT},
|
||||
{"NT_STATUS_INCOMPATIBLE_FILE_MAP",
|
||||
NT_STATUS_INCOMPATIBLE_FILE_MAP},
|
||||
{"NT_STATUS_SECTION_PROTECTION", NT_STATUS_SECTION_PROTECTION},
|
||||
{"NT_STATUS_EAS_NOT_SUPPORTED", NT_STATUS_EAS_NOT_SUPPORTED},
|
||||
{"NT_STATUS_EA_TOO_LARGE", NT_STATUS_EA_TOO_LARGE},
|
||||
{"NT_STATUS_NONEXISTENT_EA_ENTRY", NT_STATUS_NONEXISTENT_EA_ENTRY},
|
||||
{"NT_STATUS_NO_EAS_ON_FILE", NT_STATUS_NO_EAS_ON_FILE},
|
||||
{"NT_STATUS_EA_CORRUPT_ERROR", NT_STATUS_EA_CORRUPT_ERROR},
|
||||
{"NT_STATUS_FILE_LOCK_CONFLICT", NT_STATUS_FILE_LOCK_CONFLICT},
|
||||
{"NT_STATUS_LOCK_NOT_GRANTED", NT_STATUS_LOCK_NOT_GRANTED},
|
||||
{"NT_STATUS_DELETE_PENDING", NT_STATUS_DELETE_PENDING},
|
||||
{"NT_STATUS_CTL_FILE_NOT_SUPPORTED",
|
||||
NT_STATUS_CTL_FILE_NOT_SUPPORTED},
|
||||
{"NT_STATUS_UNKNOWN_REVISION", NT_STATUS_UNKNOWN_REVISION},
|
||||
{"NT_STATUS_REVISION_MISMATCH", NT_STATUS_REVISION_MISMATCH},
|
||||
{"NT_STATUS_INVALID_OWNER", NT_STATUS_INVALID_OWNER},
|
||||
{"NT_STATUS_INVALID_PRIMARY_GROUP",
|
||||
NT_STATUS_INVALID_PRIMARY_GROUP},
|
||||
{"NT_STATUS_NO_IMPERSONATION_TOKEN",
|
||||
NT_STATUS_NO_IMPERSONATION_TOKEN},
|
||||
{"NT_STATUS_CANT_DISABLE_MANDATORY",
|
||||
NT_STATUS_CANT_DISABLE_MANDATORY},
|
||||
{"NT_STATUS_NO_LOGON_SERVERS", NT_STATUS_NO_LOGON_SERVERS},
|
||||
{"NT_STATUS_NO_SUCH_LOGON_SESSION",
|
||||
NT_STATUS_NO_SUCH_LOGON_SESSION},
|
||||
{"NT_STATUS_NO_SUCH_PRIVILEGE", NT_STATUS_NO_SUCH_PRIVILEGE},
|
||||
{"NT_STATUS_PRIVILEGE_NOT_HELD", NT_STATUS_PRIVILEGE_NOT_HELD},
|
||||
{"NT_STATUS_INVALID_ACCOUNT_NAME", NT_STATUS_INVALID_ACCOUNT_NAME},
|
||||
{"NT_STATUS_USER_EXISTS", NT_STATUS_USER_EXISTS},
|
||||
{"NT_STATUS_NO_SUCH_USER", NT_STATUS_NO_SUCH_USER},
|
||||
{"NT_STATUS_GROUP_EXISTS", NT_STATUS_GROUP_EXISTS},
|
||||
{"NT_STATUS_NO_SUCH_GROUP", NT_STATUS_NO_SUCH_GROUP},
|
||||
{"NT_STATUS_MEMBER_IN_GROUP", NT_STATUS_MEMBER_IN_GROUP},
|
||||
{"NT_STATUS_MEMBER_NOT_IN_GROUP", NT_STATUS_MEMBER_NOT_IN_GROUP},
|
||||
{"NT_STATUS_LAST_ADMIN", NT_STATUS_LAST_ADMIN},
|
||||
{"NT_STATUS_WRONG_PASSWORD", NT_STATUS_WRONG_PASSWORD},
|
||||
{"NT_STATUS_ILL_FORMED_PASSWORD", NT_STATUS_ILL_FORMED_PASSWORD},
|
||||
{"NT_STATUS_PASSWORD_RESTRICTION", NT_STATUS_PASSWORD_RESTRICTION},
|
||||
{"NT_STATUS_LOGON_FAILURE", NT_STATUS_LOGON_FAILURE},
|
||||
{"NT_STATUS_ACCOUNT_RESTRICTION", NT_STATUS_ACCOUNT_RESTRICTION},
|
||||
{"NT_STATUS_INVALID_LOGON_HOURS", NT_STATUS_INVALID_LOGON_HOURS},
|
||||
{"NT_STATUS_INVALID_WORKSTATION", NT_STATUS_INVALID_WORKSTATION},
|
||||
{"NT_STATUS_PASSWORD_EXPIRED", NT_STATUS_PASSWORD_EXPIRED},
|
||||
{"NT_STATUS_ACCOUNT_DISABLED", NT_STATUS_ACCOUNT_DISABLED},
|
||||
{"NT_STATUS_NONE_MAPPED", NT_STATUS_NONE_MAPPED},
|
||||
{"NT_STATUS_TOO_MANY_LUIDS_REQUESTED",
|
||||
NT_STATUS_TOO_MANY_LUIDS_REQUESTED},
|
||||
{"NT_STATUS_LUIDS_EXHAUSTED", NT_STATUS_LUIDS_EXHAUSTED},
|
||||
{"NT_STATUS_INVALID_SUB_AUTHORITY",
|
||||
NT_STATUS_INVALID_SUB_AUTHORITY},
|
||||
{"NT_STATUS_INVALID_ACL", NT_STATUS_INVALID_ACL},
|
||||
{"NT_STATUS_INVALID_SID", NT_STATUS_INVALID_SID},
|
||||
{"NT_STATUS_INVALID_SECURITY_DESCR",
|
||||
NT_STATUS_INVALID_SECURITY_DESCR},
|
||||
{"NT_STATUS_PROCEDURE_NOT_FOUND", NT_STATUS_PROCEDURE_NOT_FOUND},
|
||||
{"NT_STATUS_INVALID_IMAGE_FORMAT", NT_STATUS_INVALID_IMAGE_FORMAT},
|
||||
{"NT_STATUS_NO_TOKEN", NT_STATUS_NO_TOKEN},
|
||||
{"NT_STATUS_BAD_INHERITANCE_ACL", NT_STATUS_BAD_INHERITANCE_ACL},
|
||||
{"NT_STATUS_RANGE_NOT_LOCKED", NT_STATUS_RANGE_NOT_LOCKED},
|
||||
{"NT_STATUS_DISK_FULL", NT_STATUS_DISK_FULL},
|
||||
{"NT_STATUS_SERVER_DISABLED", NT_STATUS_SERVER_DISABLED},
|
||||
{"NT_STATUS_SERVER_NOT_DISABLED", NT_STATUS_SERVER_NOT_DISABLED},
|
||||
{"NT_STATUS_TOO_MANY_GUIDS_REQUESTED",
|
||||
NT_STATUS_TOO_MANY_GUIDS_REQUESTED},
|
||||
{"NT_STATUS_GUIDS_EXHAUSTED", NT_STATUS_GUIDS_EXHAUSTED},
|
||||
{"NT_STATUS_INVALID_ID_AUTHORITY", NT_STATUS_INVALID_ID_AUTHORITY},
|
||||
{"NT_STATUS_AGENTS_EXHAUSTED", NT_STATUS_AGENTS_EXHAUSTED},
|
||||
{"NT_STATUS_INVALID_VOLUME_LABEL", NT_STATUS_INVALID_VOLUME_LABEL},
|
||||
{"NT_STATUS_SECTION_NOT_EXTENDED", NT_STATUS_SECTION_NOT_EXTENDED},
|
||||
{"NT_STATUS_NOT_MAPPED_DATA", NT_STATUS_NOT_MAPPED_DATA},
|
||||
{"NT_STATUS_RESOURCE_DATA_NOT_FOUND",
|
||||
NT_STATUS_RESOURCE_DATA_NOT_FOUND},
|
||||
{"NT_STATUS_RESOURCE_TYPE_NOT_FOUND",
|
||||
NT_STATUS_RESOURCE_TYPE_NOT_FOUND},
|
||||
{"NT_STATUS_RESOURCE_NAME_NOT_FOUND",
|
||||
NT_STATUS_RESOURCE_NAME_NOT_FOUND},
|
||||
{"NT_STATUS_ARRAY_BOUNDS_EXCEEDED",
|
||||
NT_STATUS_ARRAY_BOUNDS_EXCEEDED},
|
||||
{"NT_STATUS_FLOAT_DENORMAL_OPERAND",
|
||||
NT_STATUS_FLOAT_DENORMAL_OPERAND},
|
||||
{"NT_STATUS_FLOAT_DIVIDE_BY_ZERO", NT_STATUS_FLOAT_DIVIDE_BY_ZERO},
|
||||
{"NT_STATUS_FLOAT_INEXACT_RESULT", NT_STATUS_FLOAT_INEXACT_RESULT},
|
||||
{"NT_STATUS_FLOAT_INVALID_OPERATION",
|
||||
NT_STATUS_FLOAT_INVALID_OPERATION},
|
||||
{"NT_STATUS_FLOAT_OVERFLOW", NT_STATUS_FLOAT_OVERFLOW},
|
||||
{"NT_STATUS_FLOAT_STACK_CHECK", NT_STATUS_FLOAT_STACK_CHECK},
|
||||
{"NT_STATUS_FLOAT_UNDERFLOW", NT_STATUS_FLOAT_UNDERFLOW},
|
||||
{"NT_STATUS_INTEGER_DIVIDE_BY_ZERO",
|
||||
NT_STATUS_INTEGER_DIVIDE_BY_ZERO},
|
||||
{"NT_STATUS_INTEGER_OVERFLOW", NT_STATUS_INTEGER_OVERFLOW},
|
||||
{"NT_STATUS_PRIVILEGED_INSTRUCTION",
|
||||
NT_STATUS_PRIVILEGED_INSTRUCTION},
|
||||
{"NT_STATUS_TOO_MANY_PAGING_FILES",
|
||||
NT_STATUS_TOO_MANY_PAGING_FILES},
|
||||
{"NT_STATUS_FILE_INVALID", NT_STATUS_FILE_INVALID},
|
||||
{"NT_STATUS_ALLOTTED_SPACE_EXCEEDED",
|
||||
NT_STATUS_ALLOTTED_SPACE_EXCEEDED},
|
||||
{"NT_STATUS_INSUFFICIENT_RESOURCES",
|
||||
NT_STATUS_INSUFFICIENT_RESOURCES},
|
||||
{"NT_STATUS_DFS_EXIT_PATH_FOUND", NT_STATUS_DFS_EXIT_PATH_FOUND},
|
||||
{"NT_STATUS_DEVICE_DATA_ERROR", NT_STATUS_DEVICE_DATA_ERROR},
|
||||
{"NT_STATUS_DEVICE_NOT_CONNECTED", NT_STATUS_DEVICE_NOT_CONNECTED},
|
||||
{"NT_STATUS_DEVICE_POWER_FAILURE", NT_STATUS_DEVICE_POWER_FAILURE},
|
||||
{"NT_STATUS_FREE_VM_NOT_AT_BASE", NT_STATUS_FREE_VM_NOT_AT_BASE},
|
||||
{"NT_STATUS_MEMORY_NOT_ALLOCATED", NT_STATUS_MEMORY_NOT_ALLOCATED},
|
||||
{"NT_STATUS_WORKING_SET_QUOTA", NT_STATUS_WORKING_SET_QUOTA},
|
||||
{"NT_STATUS_MEDIA_WRITE_PROTECTED",
|
||||
NT_STATUS_MEDIA_WRITE_PROTECTED},
|
||||
{"NT_STATUS_DEVICE_NOT_READY", NT_STATUS_DEVICE_NOT_READY},
|
||||
{"NT_STATUS_INVALID_GROUP_ATTRIBUTES",
|
||||
NT_STATUS_INVALID_GROUP_ATTRIBUTES},
|
||||
{"NT_STATUS_BAD_IMPERSONATION_LEVEL",
|
||||
NT_STATUS_BAD_IMPERSONATION_LEVEL},
|
||||
{"NT_STATUS_CANT_OPEN_ANONYMOUS", NT_STATUS_CANT_OPEN_ANONYMOUS},
|
||||
{"NT_STATUS_BAD_VALIDATION_CLASS", NT_STATUS_BAD_VALIDATION_CLASS},
|
||||
{"NT_STATUS_BAD_TOKEN_TYPE", NT_STATUS_BAD_TOKEN_TYPE},
|
||||
{"NT_STATUS_BAD_MASTER_BOOT_RECORD",
|
||||
NT_STATUS_BAD_MASTER_BOOT_RECORD},
|
||||
{"NT_STATUS_INSTRUCTION_MISALIGNMENT",
|
||||
NT_STATUS_INSTRUCTION_MISALIGNMENT},
|
||||
{"NT_STATUS_INSTANCE_NOT_AVAILABLE",
|
||||
NT_STATUS_INSTANCE_NOT_AVAILABLE},
|
||||
{"NT_STATUS_PIPE_NOT_AVAILABLE", NT_STATUS_PIPE_NOT_AVAILABLE},
|
||||
{"NT_STATUS_INVALID_PIPE_STATE", NT_STATUS_INVALID_PIPE_STATE},
|
||||
{"NT_STATUS_PIPE_BUSY", NT_STATUS_PIPE_BUSY},
|
||||
{"NT_STATUS_ILLEGAL_FUNCTION", NT_STATUS_ILLEGAL_FUNCTION},
|
||||
{"NT_STATUS_PIPE_DISCONNECTED", NT_STATUS_PIPE_DISCONNECTED},
|
||||
{"NT_STATUS_PIPE_CLOSING", NT_STATUS_PIPE_CLOSING},
|
||||
{"NT_STATUS_PIPE_CONNECTED", NT_STATUS_PIPE_CONNECTED},
|
||||
{"NT_STATUS_PIPE_LISTENING", NT_STATUS_PIPE_LISTENING},
|
||||
{"NT_STATUS_INVALID_READ_MODE", NT_STATUS_INVALID_READ_MODE},
|
||||
{"NT_STATUS_IO_TIMEOUT", NT_STATUS_IO_TIMEOUT},
|
||||
{"NT_STATUS_FILE_FORCED_CLOSED", NT_STATUS_FILE_FORCED_CLOSED},
|
||||
{"NT_STATUS_PROFILING_NOT_STARTED",
|
||||
NT_STATUS_PROFILING_NOT_STARTED},
|
||||
{"NT_STATUS_PROFILING_NOT_STOPPED",
|
||||
NT_STATUS_PROFILING_NOT_STOPPED},
|
||||
{"NT_STATUS_COULD_NOT_INTERPRET", NT_STATUS_COULD_NOT_INTERPRET},
|
||||
{"NT_STATUS_FILE_IS_A_DIRECTORY", NT_STATUS_FILE_IS_A_DIRECTORY},
|
||||
{"NT_STATUS_NOT_SUPPORTED", NT_STATUS_NOT_SUPPORTED},
|
||||
{"NT_STATUS_REMOTE_NOT_LISTENING", NT_STATUS_REMOTE_NOT_LISTENING},
|
||||
{"NT_STATUS_DUPLICATE_NAME", NT_STATUS_DUPLICATE_NAME},
|
||||
{"NT_STATUS_BAD_NETWORK_PATH", NT_STATUS_BAD_NETWORK_PATH},
|
||||
{"NT_STATUS_NETWORK_BUSY", NT_STATUS_NETWORK_BUSY},
|
||||
{"NT_STATUS_DEVICE_DOES_NOT_EXIST",
|
||||
NT_STATUS_DEVICE_DOES_NOT_EXIST},
|
||||
{"NT_STATUS_TOO_MANY_COMMANDS", NT_STATUS_TOO_MANY_COMMANDS},
|
||||
{"NT_STATUS_ADAPTER_HARDWARE_ERROR",
|
||||
NT_STATUS_ADAPTER_HARDWARE_ERROR},
|
||||
{"NT_STATUS_INVALID_NETWORK_RESPONSE",
|
||||
NT_STATUS_INVALID_NETWORK_RESPONSE},
|
||||
{"NT_STATUS_UNEXPECTED_NETWORK_ERROR",
|
||||
NT_STATUS_UNEXPECTED_NETWORK_ERROR},
|
||||
{"NT_STATUS_BAD_REMOTE_ADAPTER", NT_STATUS_BAD_REMOTE_ADAPTER},
|
||||
{"NT_STATUS_PRINT_QUEUE_FULL", NT_STATUS_PRINT_QUEUE_FULL},
|
||||
{"NT_STATUS_NO_SPOOL_SPACE", NT_STATUS_NO_SPOOL_SPACE},
|
||||
{"NT_STATUS_PRINT_CANCELLED", NT_STATUS_PRINT_CANCELLED},
|
||||
{"NT_STATUS_NETWORK_NAME_DELETED", NT_STATUS_NETWORK_NAME_DELETED},
|
||||
{"NT_STATUS_NETWORK_ACCESS_DENIED",
|
||||
NT_STATUS_NETWORK_ACCESS_DENIED},
|
||||
{"NT_STATUS_BAD_DEVICE_TYPE", NT_STATUS_BAD_DEVICE_TYPE},
|
||||
{"NT_STATUS_BAD_NETWORK_NAME", NT_STATUS_BAD_NETWORK_NAME},
|
||||
{"NT_STATUS_TOO_MANY_NAMES", NT_STATUS_TOO_MANY_NAMES},
|
||||
{"NT_STATUS_TOO_MANY_SESSIONS", NT_STATUS_TOO_MANY_SESSIONS},
|
||||
{"NT_STATUS_SHARING_PAUSED", NT_STATUS_SHARING_PAUSED},
|
||||
{"NT_STATUS_REQUEST_NOT_ACCEPTED", NT_STATUS_REQUEST_NOT_ACCEPTED},
|
||||
{"NT_STATUS_REDIRECTOR_PAUSED", NT_STATUS_REDIRECTOR_PAUSED},
|
||||
{"NT_STATUS_NET_WRITE_FAULT", NT_STATUS_NET_WRITE_FAULT},
|
||||
{"NT_STATUS_PROFILING_AT_LIMIT", NT_STATUS_PROFILING_AT_LIMIT},
|
||||
{"NT_STATUS_NOT_SAME_DEVICE", NT_STATUS_NOT_SAME_DEVICE},
|
||||
{"NT_STATUS_FILE_RENAMED", NT_STATUS_FILE_RENAMED},
|
||||
{"NT_STATUS_VIRTUAL_CIRCUIT_CLOSED",
|
||||
NT_STATUS_VIRTUAL_CIRCUIT_CLOSED},
|
||||
{"NT_STATUS_NO_SECURITY_ON_OBJECT",
|
||||
NT_STATUS_NO_SECURITY_ON_OBJECT},
|
||||
{"NT_STATUS_CANT_WAIT", NT_STATUS_CANT_WAIT},
|
||||
{"NT_STATUS_PIPE_EMPTY", NT_STATUS_PIPE_EMPTY},
|
||||
{"NT_STATUS_CANT_ACCESS_DOMAIN_INFO",
|
||||
NT_STATUS_CANT_ACCESS_DOMAIN_INFO},
|
||||
{"NT_STATUS_CANT_TERMINATE_SELF", NT_STATUS_CANT_TERMINATE_SELF},
|
||||
{"NT_STATUS_INVALID_SERVER_STATE", NT_STATUS_INVALID_SERVER_STATE},
|
||||
{"NT_STATUS_INVALID_DOMAIN_STATE", NT_STATUS_INVALID_DOMAIN_STATE},
|
||||
{"NT_STATUS_INVALID_DOMAIN_ROLE", NT_STATUS_INVALID_DOMAIN_ROLE},
|
||||
{"NT_STATUS_NO_SUCH_DOMAIN", NT_STATUS_NO_SUCH_DOMAIN},
|
||||
{"NT_STATUS_DOMAIN_EXISTS", NT_STATUS_DOMAIN_EXISTS},
|
||||
{"NT_STATUS_DOMAIN_LIMIT_EXCEEDED",
|
||||
NT_STATUS_DOMAIN_LIMIT_EXCEEDED},
|
||||
{"NT_STATUS_OPLOCK_NOT_GRANTED", NT_STATUS_OPLOCK_NOT_GRANTED},
|
||||
{"NT_STATUS_INVALID_OPLOCK_PROTOCOL",
|
||||
NT_STATUS_INVALID_OPLOCK_PROTOCOL},
|
||||
{"NT_STATUS_INTERNAL_DB_CORRUPTION",
|
||||
NT_STATUS_INTERNAL_DB_CORRUPTION},
|
||||
{"NT_STATUS_INTERNAL_ERROR", NT_STATUS_INTERNAL_ERROR},
|
||||
{"NT_STATUS_GENERIC_NOT_MAPPED", NT_STATUS_GENERIC_NOT_MAPPED},
|
||||
{"NT_STATUS_BAD_DESCRIPTOR_FORMAT",
|
||||
NT_STATUS_BAD_DESCRIPTOR_FORMAT},
|
||||
{"NT_STATUS_INVALID_USER_BUFFER", NT_STATUS_INVALID_USER_BUFFER},
|
||||
{"NT_STATUS_UNEXPECTED_IO_ERROR", NT_STATUS_UNEXPECTED_IO_ERROR},
|
||||
{"NT_STATUS_UNEXPECTED_MM_CREATE_ERR",
|
||||
NT_STATUS_UNEXPECTED_MM_CREATE_ERR},
|
||||
{"NT_STATUS_UNEXPECTED_MM_MAP_ERROR",
|
||||
NT_STATUS_UNEXPECTED_MM_MAP_ERROR},
|
||||
{"NT_STATUS_UNEXPECTED_MM_EXTEND_ERR",
|
||||
NT_STATUS_UNEXPECTED_MM_EXTEND_ERR},
|
||||
{"NT_STATUS_NOT_LOGON_PROCESS", NT_STATUS_NOT_LOGON_PROCESS},
|
||||
{"NT_STATUS_LOGON_SESSION_EXISTS", NT_STATUS_LOGON_SESSION_EXISTS},
|
||||
{"NT_STATUS_INVALID_PARAMETER_1", NT_STATUS_INVALID_PARAMETER_1},
|
||||
{"NT_STATUS_INVALID_PARAMETER_2", NT_STATUS_INVALID_PARAMETER_2},
|
||||
{"NT_STATUS_INVALID_PARAMETER_3", NT_STATUS_INVALID_PARAMETER_3},
|
||||
{"NT_STATUS_INVALID_PARAMETER_4", NT_STATUS_INVALID_PARAMETER_4},
|
||||
{"NT_STATUS_INVALID_PARAMETER_5", NT_STATUS_INVALID_PARAMETER_5},
|
||||
{"NT_STATUS_INVALID_PARAMETER_6", NT_STATUS_INVALID_PARAMETER_6},
|
||||
{"NT_STATUS_INVALID_PARAMETER_7", NT_STATUS_INVALID_PARAMETER_7},
|
||||
{"NT_STATUS_INVALID_PARAMETER_8", NT_STATUS_INVALID_PARAMETER_8},
|
||||
{"NT_STATUS_INVALID_PARAMETER_9", NT_STATUS_INVALID_PARAMETER_9},
|
||||
{"NT_STATUS_INVALID_PARAMETER_10", NT_STATUS_INVALID_PARAMETER_10},
|
||||
{"NT_STATUS_INVALID_PARAMETER_11", NT_STATUS_INVALID_PARAMETER_11},
|
||||
{"NT_STATUS_INVALID_PARAMETER_12", NT_STATUS_INVALID_PARAMETER_12},
|
||||
{"NT_STATUS_REDIRECTOR_NOT_STARTED",
|
||||
NT_STATUS_REDIRECTOR_NOT_STARTED},
|
||||
{"NT_STATUS_REDIRECTOR_STARTED", NT_STATUS_REDIRECTOR_STARTED},
|
||||
{"NT_STATUS_STACK_OVERFLOW", NT_STATUS_STACK_OVERFLOW},
|
||||
{"NT_STATUS_NO_SUCH_PACKAGE", NT_STATUS_NO_SUCH_PACKAGE},
|
||||
{"NT_STATUS_BAD_FUNCTION_TABLE", NT_STATUS_BAD_FUNCTION_TABLE},
|
||||
{"NT_STATUS_VARIABLE_NOT_FOUND", NT_STATUS_VARIABLE_NOT_FOUND},
|
||||
{"NT_STATUS_DIRECTORY_NOT_EMPTY", NT_STATUS_DIRECTORY_NOT_EMPTY},
|
||||
{"NT_STATUS_FILE_CORRUPT_ERROR", NT_STATUS_FILE_CORRUPT_ERROR},
|
||||
{"NT_STATUS_NOT_A_DIRECTORY", NT_STATUS_NOT_A_DIRECTORY},
|
||||
{"NT_STATUS_BAD_LOGON_SESSION_STATE",
|
||||
NT_STATUS_BAD_LOGON_SESSION_STATE},
|
||||
{"NT_STATUS_LOGON_SESSION_COLLISION",
|
||||
NT_STATUS_LOGON_SESSION_COLLISION},
|
||||
{"NT_STATUS_NAME_TOO_LONG", NT_STATUS_NAME_TOO_LONG},
|
||||
{"NT_STATUS_FILES_OPEN", NT_STATUS_FILES_OPEN},
|
||||
{"NT_STATUS_CONNECTION_IN_USE", NT_STATUS_CONNECTION_IN_USE},
|
||||
{"NT_STATUS_MESSAGE_NOT_FOUND", NT_STATUS_MESSAGE_NOT_FOUND},
|
||||
{"NT_STATUS_PROCESS_IS_TERMINATING",
|
||||
NT_STATUS_PROCESS_IS_TERMINATING},
|
||||
{"NT_STATUS_INVALID_LOGON_TYPE", NT_STATUS_INVALID_LOGON_TYPE},
|
||||
{"NT_STATUS_NO_GUID_TRANSLATION", NT_STATUS_NO_GUID_TRANSLATION},
|
||||
{"NT_STATUS_CANNOT_IMPERSONATE", NT_STATUS_CANNOT_IMPERSONATE},
|
||||
{"NT_STATUS_IMAGE_ALREADY_LOADED", NT_STATUS_IMAGE_ALREADY_LOADED},
|
||||
{"NT_STATUS_ABIOS_NOT_PRESENT", NT_STATUS_ABIOS_NOT_PRESENT},
|
||||
{"NT_STATUS_ABIOS_LID_NOT_EXIST", NT_STATUS_ABIOS_LID_NOT_EXIST},
|
||||
{"NT_STATUS_ABIOS_LID_ALREADY_OWNED",
|
||||
NT_STATUS_ABIOS_LID_ALREADY_OWNED},
|
||||
{"NT_STATUS_ABIOS_NOT_LID_OWNER", NT_STATUS_ABIOS_NOT_LID_OWNER},
|
||||
{"NT_STATUS_ABIOS_INVALID_COMMAND",
|
||||
NT_STATUS_ABIOS_INVALID_COMMAND},
|
||||
{"NT_STATUS_ABIOS_INVALID_LID", NT_STATUS_ABIOS_INVALID_LID},
|
||||
{"NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE",
|
||||
NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE},
|
||||
{"NT_STATUS_ABIOS_INVALID_SELECTOR",
|
||||
NT_STATUS_ABIOS_INVALID_SELECTOR},
|
||||
{"NT_STATUS_NO_LDT", NT_STATUS_NO_LDT},
|
||||
{"NT_STATUS_INVALID_LDT_SIZE", NT_STATUS_INVALID_LDT_SIZE},
|
||||
{"NT_STATUS_INVALID_LDT_OFFSET", NT_STATUS_INVALID_LDT_OFFSET},
|
||||
{"NT_STATUS_INVALID_LDT_DESCRIPTOR",
|
||||
NT_STATUS_INVALID_LDT_DESCRIPTOR},
|
||||
{"NT_STATUS_INVALID_IMAGE_NE_FORMAT",
|
||||
NT_STATUS_INVALID_IMAGE_NE_FORMAT},
|
||||
{"NT_STATUS_RXACT_INVALID_STATE", NT_STATUS_RXACT_INVALID_STATE},
|
||||
{"NT_STATUS_RXACT_COMMIT_FAILURE", NT_STATUS_RXACT_COMMIT_FAILURE},
|
||||
{"NT_STATUS_MAPPED_FILE_SIZE_ZERO",
|
||||
NT_STATUS_MAPPED_FILE_SIZE_ZERO},
|
||||
{"NT_STATUS_TOO_MANY_OPENED_FILES",
|
||||
NT_STATUS_TOO_MANY_OPENED_FILES},
|
||||
{"NT_STATUS_CANCELLED", NT_STATUS_CANCELLED},
|
||||
{"NT_STATUS_CANNOT_DELETE", NT_STATUS_CANNOT_DELETE},
|
||||
{"NT_STATUS_INVALID_COMPUTER_NAME",
|
||||
NT_STATUS_INVALID_COMPUTER_NAME},
|
||||
{"NT_STATUS_FILE_DELETED", NT_STATUS_FILE_DELETED},
|
||||
{"NT_STATUS_SPECIAL_ACCOUNT", NT_STATUS_SPECIAL_ACCOUNT},
|
||||
{"NT_STATUS_SPECIAL_GROUP", NT_STATUS_SPECIAL_GROUP},
|
||||
{"NT_STATUS_SPECIAL_USER", NT_STATUS_SPECIAL_USER},
|
||||
{"NT_STATUS_MEMBERS_PRIMARY_GROUP",
|
||||
NT_STATUS_MEMBERS_PRIMARY_GROUP},
|
||||
{"NT_STATUS_FILE_CLOSED", NT_STATUS_FILE_CLOSED},
|
||||
{"NT_STATUS_TOO_MANY_THREADS", NT_STATUS_TOO_MANY_THREADS},
|
||||
{"NT_STATUS_THREAD_NOT_IN_PROCESS",
|
||||
NT_STATUS_THREAD_NOT_IN_PROCESS},
|
||||
{"NT_STATUS_TOKEN_ALREADY_IN_USE", NT_STATUS_TOKEN_ALREADY_IN_USE},
|
||||
{"NT_STATUS_PAGEFILE_QUOTA_EXCEEDED",
|
||||
NT_STATUS_PAGEFILE_QUOTA_EXCEEDED},
|
||||
{"NT_STATUS_COMMITMENT_LIMIT", NT_STATUS_COMMITMENT_LIMIT},
|
||||
{"NT_STATUS_INVALID_IMAGE_LE_FORMAT",
|
||||
NT_STATUS_INVALID_IMAGE_LE_FORMAT},
|
||||
{"NT_STATUS_INVALID_IMAGE_NOT_MZ", NT_STATUS_INVALID_IMAGE_NOT_MZ},
|
||||
{"NT_STATUS_INVALID_IMAGE_PROTECT",
|
||||
NT_STATUS_INVALID_IMAGE_PROTECT},
|
||||
{"NT_STATUS_INVALID_IMAGE_WIN_16", NT_STATUS_INVALID_IMAGE_WIN_16},
|
||||
{"NT_STATUS_LOGON_SERVER_CONFLICT",
|
||||
NT_STATUS_LOGON_SERVER_CONFLICT},
|
||||
{"NT_STATUS_TIME_DIFFERENCE_AT_DC",
|
||||
NT_STATUS_TIME_DIFFERENCE_AT_DC},
|
||||
{"NT_STATUS_SYNCHRONIZATION_REQUIRED",
|
||||
NT_STATUS_SYNCHRONIZATION_REQUIRED},
|
||||
{"NT_STATUS_DLL_NOT_FOUND", NT_STATUS_DLL_NOT_FOUND},
|
||||
{"NT_STATUS_OPEN_FAILED", NT_STATUS_OPEN_FAILED},
|
||||
{"NT_STATUS_IO_PRIVILEGE_FAILED", NT_STATUS_IO_PRIVILEGE_FAILED},
|
||||
{"NT_STATUS_ORDINAL_NOT_FOUND", NT_STATUS_ORDINAL_NOT_FOUND},
|
||||
{"NT_STATUS_ENTRYPOINT_NOT_FOUND", NT_STATUS_ENTRYPOINT_NOT_FOUND},
|
||||
{"NT_STATUS_CONTROL_C_EXIT", NT_STATUS_CONTROL_C_EXIT},
|
||||
{"NT_STATUS_LOCAL_DISCONNECT", NT_STATUS_LOCAL_DISCONNECT},
|
||||
{"NT_STATUS_REMOTE_DISCONNECT", NT_STATUS_REMOTE_DISCONNECT},
|
||||
{"NT_STATUS_REMOTE_RESOURCES", NT_STATUS_REMOTE_RESOURCES},
|
||||
{"NT_STATUS_LINK_FAILED", NT_STATUS_LINK_FAILED},
|
||||
{"NT_STATUS_LINK_TIMEOUT", NT_STATUS_LINK_TIMEOUT},
|
||||
{"NT_STATUS_INVALID_CONNECTION", NT_STATUS_INVALID_CONNECTION},
|
||||
{"NT_STATUS_INVALID_ADDRESS", NT_STATUS_INVALID_ADDRESS},
|
||||
{"NT_STATUS_DLL_INIT_FAILED", NT_STATUS_DLL_INIT_FAILED},
|
||||
{"NT_STATUS_MISSING_SYSTEMFILE", NT_STATUS_MISSING_SYSTEMFILE},
|
||||
{"NT_STATUS_UNHANDLED_EXCEPTION", NT_STATUS_UNHANDLED_EXCEPTION},
|
||||
{"NT_STATUS_APP_INIT_FAILURE", NT_STATUS_APP_INIT_FAILURE},
|
||||
{"NT_STATUS_PAGEFILE_CREATE_FAILED",
|
||||
NT_STATUS_PAGEFILE_CREATE_FAILED},
|
||||
{"NT_STATUS_NO_PAGEFILE", NT_STATUS_NO_PAGEFILE},
|
||||
{"NT_STATUS_INVALID_LEVEL", NT_STATUS_INVALID_LEVEL},
|
||||
{"NT_STATUS_WRONG_PASSWORD_CORE", NT_STATUS_WRONG_PASSWORD_CORE},
|
||||
{"NT_STATUS_ILLEGAL_FLOAT_CONTEXT",
|
||||
NT_STATUS_ILLEGAL_FLOAT_CONTEXT},
|
||||
{"NT_STATUS_PIPE_BROKEN", NT_STATUS_PIPE_BROKEN},
|
||||
{"NT_STATUS_REGISTRY_CORRUPT", NT_STATUS_REGISTRY_CORRUPT},
|
||||
{"NT_STATUS_REGISTRY_IO_FAILED", NT_STATUS_REGISTRY_IO_FAILED},
|
||||
{"NT_STATUS_NO_EVENT_PAIR", NT_STATUS_NO_EVENT_PAIR},
|
||||
{"NT_STATUS_UNRECOGNIZED_VOLUME", NT_STATUS_UNRECOGNIZED_VOLUME},
|
||||
{"NT_STATUS_SERIAL_NO_DEVICE_INITED",
|
||||
NT_STATUS_SERIAL_NO_DEVICE_INITED},
|
||||
{"NT_STATUS_NO_SUCH_ALIAS", NT_STATUS_NO_SUCH_ALIAS},
|
||||
{"NT_STATUS_MEMBER_NOT_IN_ALIAS", NT_STATUS_MEMBER_NOT_IN_ALIAS},
|
||||
{"NT_STATUS_MEMBER_IN_ALIAS", NT_STATUS_MEMBER_IN_ALIAS},
|
||||
{"NT_STATUS_ALIAS_EXISTS", NT_STATUS_ALIAS_EXISTS},
|
||||
{"NT_STATUS_LOGON_NOT_GRANTED", NT_STATUS_LOGON_NOT_GRANTED},
|
||||
{"NT_STATUS_TOO_MANY_SECRETS", NT_STATUS_TOO_MANY_SECRETS},
|
||||
{"NT_STATUS_SECRET_TOO_LONG", NT_STATUS_SECRET_TOO_LONG},
|
||||
{"NT_STATUS_INTERNAL_DB_ERROR", NT_STATUS_INTERNAL_DB_ERROR},
|
||||
{"NT_STATUS_FULLSCREEN_MODE", NT_STATUS_FULLSCREEN_MODE},
|
||||
{"NT_STATUS_TOO_MANY_CONTEXT_IDS", NT_STATUS_TOO_MANY_CONTEXT_IDS},
|
||||
{"NT_STATUS_LOGON_TYPE_NOT_GRANTED",
|
||||
NT_STATUS_LOGON_TYPE_NOT_GRANTED},
|
||||
{"NT_STATUS_NOT_REGISTRY_FILE", NT_STATUS_NOT_REGISTRY_FILE},
|
||||
{"NT_STATUS_NT_CROSS_ENCRYPTION_REQUIRED",
|
||||
NT_STATUS_NT_CROSS_ENCRYPTION_REQUIRED},
|
||||
{"NT_STATUS_DOMAIN_CTRLR_CONFIG_ERROR",
|
||||
NT_STATUS_DOMAIN_CTRLR_CONFIG_ERROR},
|
||||
{"NT_STATUS_FT_MISSING_MEMBER", NT_STATUS_FT_MISSING_MEMBER},
|
||||
{"NT_STATUS_ILL_FORMED_SERVICE_ENTRY",
|
||||
NT_STATUS_ILL_FORMED_SERVICE_ENTRY},
|
||||
{"NT_STATUS_ILLEGAL_CHARACTER", NT_STATUS_ILLEGAL_CHARACTER},
|
||||
{"NT_STATUS_UNMAPPABLE_CHARACTER", NT_STATUS_UNMAPPABLE_CHARACTER},
|
||||
{"NT_STATUS_UNDEFINED_CHARACTER", NT_STATUS_UNDEFINED_CHARACTER},
|
||||
{"NT_STATUS_FLOPPY_VOLUME", NT_STATUS_FLOPPY_VOLUME},
|
||||
{"NT_STATUS_FLOPPY_ID_MARK_NOT_FOUND",
|
||||
NT_STATUS_FLOPPY_ID_MARK_NOT_FOUND},
|
||||
{"NT_STATUS_FLOPPY_WRONG_CYLINDER",
|
||||
NT_STATUS_FLOPPY_WRONG_CYLINDER},
|
||||
{"NT_STATUS_FLOPPY_UNKNOWN_ERROR", NT_STATUS_FLOPPY_UNKNOWN_ERROR},
|
||||
{"NT_STATUS_FLOPPY_BAD_REGISTERS", NT_STATUS_FLOPPY_BAD_REGISTERS},
|
||||
{"NT_STATUS_DISK_RECALIBRATE_FAILED",
|
||||
NT_STATUS_DISK_RECALIBRATE_FAILED},
|
||||
{"NT_STATUS_DISK_OPERATION_FAILED",
|
||||
NT_STATUS_DISK_OPERATION_FAILED},
|
||||
{"NT_STATUS_DISK_RESET_FAILED", NT_STATUS_DISK_RESET_FAILED},
|
||||
{"NT_STATUS_SHARED_IRQ_BUSY", NT_STATUS_SHARED_IRQ_BUSY},
|
||||
{"NT_STATUS_FT_ORPHANING", NT_STATUS_FT_ORPHANING},
|
||||
{"NT_STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT",
|
||||
NT_STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT},
|
||||
{"NT_STATUS_PARTITION_FAILURE", NT_STATUS_PARTITION_FAILURE},
|
||||
{"NT_STATUS_INVALID_BLOCK_LENGTH", NT_STATUS_INVALID_BLOCK_LENGTH},
|
||||
{"NT_STATUS_DEVICE_NOT_PARTITIONED",
|
||||
NT_STATUS_DEVICE_NOT_PARTITIONED},
|
||||
{"NT_STATUS_UNABLE_TO_LOCK_MEDIA", NT_STATUS_UNABLE_TO_LOCK_MEDIA},
|
||||
{"NT_STATUS_UNABLE_TO_UNLOAD_MEDIA",
|
||||
NT_STATUS_UNABLE_TO_UNLOAD_MEDIA},
|
||||
{"NT_STATUS_EOM_OVERFLOW", NT_STATUS_EOM_OVERFLOW},
|
||||
{"NT_STATUS_NO_MEDIA", NT_STATUS_NO_MEDIA},
|
||||
{"NT_STATUS_NO_SUCH_MEMBER", NT_STATUS_NO_SUCH_MEMBER},
|
||||
{"NT_STATUS_INVALID_MEMBER", NT_STATUS_INVALID_MEMBER},
|
||||
{"NT_STATUS_KEY_DELETED", NT_STATUS_KEY_DELETED},
|
||||
{"NT_STATUS_NO_LOG_SPACE", NT_STATUS_NO_LOG_SPACE},
|
||||
{"NT_STATUS_TOO_MANY_SIDS", NT_STATUS_TOO_MANY_SIDS},
|
||||
{"NT_STATUS_LM_CROSS_ENCRYPTION_REQUIRED",
|
||||
NT_STATUS_LM_CROSS_ENCRYPTION_REQUIRED},
|
||||
{"NT_STATUS_KEY_HAS_CHILDREN", NT_STATUS_KEY_HAS_CHILDREN},
|
||||
{"NT_STATUS_CHILD_MUST_BE_VOLATILE",
|
||||
NT_STATUS_CHILD_MUST_BE_VOLATILE},
|
||||
{"NT_STATUS_DEVICE_CONFIGURATION_ERROR",
|
||||
NT_STATUS_DEVICE_CONFIGURATION_ERROR},
|
||||
{"NT_STATUS_DRIVER_INTERNAL_ERROR",
|
||||
NT_STATUS_DRIVER_INTERNAL_ERROR},
|
||||
{"NT_STATUS_INVALID_DEVICE_STATE", NT_STATUS_INVALID_DEVICE_STATE},
|
||||
{"NT_STATUS_IO_DEVICE_ERROR", NT_STATUS_IO_DEVICE_ERROR},
|
||||
{"NT_STATUS_DEVICE_PROTOCOL_ERROR",
|
||||
NT_STATUS_DEVICE_PROTOCOL_ERROR},
|
||||
{"NT_STATUS_BACKUP_CONTROLLER", NT_STATUS_BACKUP_CONTROLLER},
|
||||
{"NT_STATUS_LOG_FILE_FULL", NT_STATUS_LOG_FILE_FULL},
|
||||
{"NT_STATUS_TOO_LATE", NT_STATUS_TOO_LATE},
|
||||
{"NT_STATUS_NO_TRUST_LSA_SECRET", NT_STATUS_NO_TRUST_LSA_SECRET},
|
||||
{"NT_STATUS_NO_TRUST_SAM_ACCOUNT", NT_STATUS_NO_TRUST_SAM_ACCOUNT},
|
||||
{"NT_STATUS_TRUSTED_DOMAIN_FAILURE",
|
||||
NT_STATUS_TRUSTED_DOMAIN_FAILURE},
|
||||
{"NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE",
|
||||
NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE},
|
||||
{"NT_STATUS_EVENTLOG_FILE_CORRUPT",
|
||||
NT_STATUS_EVENTLOG_FILE_CORRUPT},
|
||||
{"NT_STATUS_EVENTLOG_CANT_START", NT_STATUS_EVENTLOG_CANT_START},
|
||||
{"NT_STATUS_TRUST_FAILURE", NT_STATUS_TRUST_FAILURE},
|
||||
{"NT_STATUS_MUTANT_LIMIT_EXCEEDED",
|
||||
NT_STATUS_MUTANT_LIMIT_EXCEEDED},
|
||||
{"NT_STATUS_NETLOGON_NOT_STARTED", NT_STATUS_NETLOGON_NOT_STARTED},
|
||||
{"NT_STATUS_ACCOUNT_EXPIRED", NT_STATUS_ACCOUNT_EXPIRED},
|
||||
{"NT_STATUS_POSSIBLE_DEADLOCK", NT_STATUS_POSSIBLE_DEADLOCK},
|
||||
{"NT_STATUS_NETWORK_CREDENTIAL_CONFLICT",
|
||||
NT_STATUS_NETWORK_CREDENTIAL_CONFLICT},
|
||||
{"NT_STATUS_REMOTE_SESSION_LIMIT", NT_STATUS_REMOTE_SESSION_LIMIT},
|
||||
{"NT_STATUS_EVENTLOG_FILE_CHANGED",
|
||||
NT_STATUS_EVENTLOG_FILE_CHANGED},
|
||||
{"NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT",
|
||||
NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT},
|
||||
{"NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT",
|
||||
NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT},
|
||||
{"NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT",
|
||||
NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT},
|
||||
{"NT_STATUS_DOMAIN_TRUST_INCONSISTENT",
|
||||
NT_STATUS_DOMAIN_TRUST_INCONSISTENT},
|
||||
{"NT_STATUS_FS_DRIVER_REQUIRED", NT_STATUS_FS_DRIVER_REQUIRED},
|
||||
{"NT_STATUS_INVALID_LOCK_RANGE", NT_STATUS_INVALID_LOCK_RANGE},
|
||||
{"NT_STATUS_NO_USER_SESSION_KEY", NT_STATUS_NO_USER_SESSION_KEY},
|
||||
{"NT_STATUS_USER_SESSION_DELETED", NT_STATUS_USER_SESSION_DELETED},
|
||||
{"NT_STATUS_RESOURCE_LANG_NOT_FOUND",
|
||||
NT_STATUS_RESOURCE_LANG_NOT_FOUND},
|
||||
{"NT_STATUS_INSUFF_SERVER_RESOURCES",
|
||||
NT_STATUS_INSUFF_SERVER_RESOURCES},
|
||||
{"NT_STATUS_INVALID_BUFFER_SIZE", NT_STATUS_INVALID_BUFFER_SIZE},
|
||||
{"NT_STATUS_INVALID_ADDRESS_COMPONENT",
|
||||
NT_STATUS_INVALID_ADDRESS_COMPONENT},
|
||||
{"NT_STATUS_INVALID_ADDRESS_WILDCARD",
|
||||
NT_STATUS_INVALID_ADDRESS_WILDCARD},
|
||||
{"NT_STATUS_TOO_MANY_ADDRESSES", NT_STATUS_TOO_MANY_ADDRESSES},
|
||||
{"NT_STATUS_ADDRESS_ALREADY_EXISTS",
|
||||
NT_STATUS_ADDRESS_ALREADY_EXISTS},
|
||||
{"NT_STATUS_ADDRESS_CLOSED", NT_STATUS_ADDRESS_CLOSED},
|
||||
{"NT_STATUS_CONNECTION_DISCONNECTED",
|
||||
NT_STATUS_CONNECTION_DISCONNECTED},
|
||||
{"NT_STATUS_CONNECTION_RESET", NT_STATUS_CONNECTION_RESET},
|
||||
{"NT_STATUS_TOO_MANY_NODES", NT_STATUS_TOO_MANY_NODES},
|
||||
{"NT_STATUS_TRANSACTION_ABORTED", NT_STATUS_TRANSACTION_ABORTED},
|
||||
{"NT_STATUS_TRANSACTION_TIMED_OUT",
|
||||
NT_STATUS_TRANSACTION_TIMED_OUT},
|
||||
{"NT_STATUS_TRANSACTION_NO_RELEASE",
|
||||
NT_STATUS_TRANSACTION_NO_RELEASE},
|
||||
{"NT_STATUS_TRANSACTION_NO_MATCH", NT_STATUS_TRANSACTION_NO_MATCH},
|
||||
{"NT_STATUS_TRANSACTION_RESPONDED",
|
||||
NT_STATUS_TRANSACTION_RESPONDED},
|
||||
{"NT_STATUS_TRANSACTION_INVALID_ID",
|
||||
NT_STATUS_TRANSACTION_INVALID_ID},
|
||||
{"NT_STATUS_TRANSACTION_INVALID_TYPE",
|
||||
NT_STATUS_TRANSACTION_INVALID_TYPE},
|
||||
{"NT_STATUS_NOT_SERVER_SESSION", NT_STATUS_NOT_SERVER_SESSION},
|
||||
{"NT_STATUS_NOT_CLIENT_SESSION", NT_STATUS_NOT_CLIENT_SESSION},
|
||||
{"NT_STATUS_CANNOT_LOAD_REGISTRY_FILE",
|
||||
NT_STATUS_CANNOT_LOAD_REGISTRY_FILE},
|
||||
{"NT_STATUS_DEBUG_ATTACH_FAILED", NT_STATUS_DEBUG_ATTACH_FAILED},
|
||||
{"NT_STATUS_SYSTEM_PROCESS_TERMINATED",
|
||||
NT_STATUS_SYSTEM_PROCESS_TERMINATED},
|
||||
{"NT_STATUS_DATA_NOT_ACCEPTED", NT_STATUS_DATA_NOT_ACCEPTED},
|
||||
{"NT_STATUS_NO_BROWSER_SERVERS_FOUND",
|
||||
NT_STATUS_NO_BROWSER_SERVERS_FOUND},
|
||||
{"NT_STATUS_VDM_HARD_ERROR", NT_STATUS_VDM_HARD_ERROR},
|
||||
{"NT_STATUS_DRIVER_CANCEL_TIMEOUT",
|
||||
NT_STATUS_DRIVER_CANCEL_TIMEOUT},
|
||||
{"NT_STATUS_REPLY_MESSAGE_MISMATCH",
|
||||
NT_STATUS_REPLY_MESSAGE_MISMATCH},
|
||||
{"NT_STATUS_MAPPED_ALIGNMENT", NT_STATUS_MAPPED_ALIGNMENT},
|
||||
{"NT_STATUS_IMAGE_CHECKSUM_MISMATCH",
|
||||
NT_STATUS_IMAGE_CHECKSUM_MISMATCH},
|
||||
{"NT_STATUS_LOST_WRITEBEHIND_DATA",
|
||||
NT_STATUS_LOST_WRITEBEHIND_DATA},
|
||||
{"NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID",
|
||||
NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID},
|
||||
{"NT_STATUS_PASSWORD_MUST_CHANGE", NT_STATUS_PASSWORD_MUST_CHANGE},
|
||||
{"NT_STATUS_NOT_FOUND", NT_STATUS_NOT_FOUND},
|
||||
{"NT_STATUS_NOT_TINY_STREAM", NT_STATUS_NOT_TINY_STREAM},
|
||||
{"NT_STATUS_RECOVERY_FAILURE", NT_STATUS_RECOVERY_FAILURE},
|
||||
{"NT_STATUS_STACK_OVERFLOW_READ", NT_STATUS_STACK_OVERFLOW_READ},
|
||||
{"NT_STATUS_FAIL_CHECK", NT_STATUS_FAIL_CHECK},
|
||||
{"NT_STATUS_DUPLICATE_OBJECTID", NT_STATUS_DUPLICATE_OBJECTID},
|
||||
{"NT_STATUS_OBJECTID_EXISTS", NT_STATUS_OBJECTID_EXISTS},
|
||||
{"NT_STATUS_CONVERT_TO_LARGE", NT_STATUS_CONVERT_TO_LARGE},
|
||||
{"NT_STATUS_RETRY", NT_STATUS_RETRY},
|
||||
{"NT_STATUS_FOUND_OUT_OF_SCOPE", NT_STATUS_FOUND_OUT_OF_SCOPE},
|
||||
{"NT_STATUS_ALLOCATE_BUCKET", NT_STATUS_ALLOCATE_BUCKET},
|
||||
{"NT_STATUS_PROPSET_NOT_FOUND", NT_STATUS_PROPSET_NOT_FOUND},
|
||||
{"NT_STATUS_MARSHALL_OVERFLOW", NT_STATUS_MARSHALL_OVERFLOW},
|
||||
{"NT_STATUS_INVALID_VARIANT", NT_STATUS_INVALID_VARIANT},
|
||||
{"NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND",
|
||||
NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND},
|
||||
{"NT_STATUS_ACCOUNT_LOCKED_OUT", NT_STATUS_ACCOUNT_LOCKED_OUT},
|
||||
{"NT_STATUS_HANDLE_NOT_CLOSABLE", NT_STATUS_HANDLE_NOT_CLOSABLE},
|
||||
{"NT_STATUS_CONNECTION_REFUSED", NT_STATUS_CONNECTION_REFUSED},
|
||||
{"NT_STATUS_GRACEFUL_DISCONNECT", NT_STATUS_GRACEFUL_DISCONNECT},
|
||||
{"NT_STATUS_ADDRESS_ALREADY_ASSOCIATED",
|
||||
NT_STATUS_ADDRESS_ALREADY_ASSOCIATED},
|
||||
{"NT_STATUS_ADDRESS_NOT_ASSOCIATED",
|
||||
NT_STATUS_ADDRESS_NOT_ASSOCIATED},
|
||||
{"NT_STATUS_CONNECTION_INVALID", NT_STATUS_CONNECTION_INVALID},
|
||||
{"NT_STATUS_CONNECTION_ACTIVE", NT_STATUS_CONNECTION_ACTIVE},
|
||||
{"NT_STATUS_NETWORK_UNREACHABLE", NT_STATUS_NETWORK_UNREACHABLE},
|
||||
{"NT_STATUS_HOST_UNREACHABLE", NT_STATUS_HOST_UNREACHABLE},
|
||||
{"NT_STATUS_PROTOCOL_UNREACHABLE", NT_STATUS_PROTOCOL_UNREACHABLE},
|
||||
{"NT_STATUS_PORT_UNREACHABLE", NT_STATUS_PORT_UNREACHABLE},
|
||||
{"NT_STATUS_REQUEST_ABORTED", NT_STATUS_REQUEST_ABORTED},
|
||||
{"NT_STATUS_CONNECTION_ABORTED", NT_STATUS_CONNECTION_ABORTED},
|
||||
{"NT_STATUS_BAD_COMPRESSION_BUFFER",
|
||||
NT_STATUS_BAD_COMPRESSION_BUFFER},
|
||||
{"NT_STATUS_USER_MAPPED_FILE", NT_STATUS_USER_MAPPED_FILE},
|
||||
{"NT_STATUS_AUDIT_FAILED", NT_STATUS_AUDIT_FAILED},
|
||||
{"NT_STATUS_TIMER_RESOLUTION_NOT_SET",
|
||||
NT_STATUS_TIMER_RESOLUTION_NOT_SET},
|
||||
{"NT_STATUS_CONNECTION_COUNT_LIMIT",
|
||||
NT_STATUS_CONNECTION_COUNT_LIMIT},
|
||||
{"NT_STATUS_LOGIN_TIME_RESTRICTION",
|
||||
NT_STATUS_LOGIN_TIME_RESTRICTION},
|
||||
{"NT_STATUS_LOGIN_WKSTA_RESTRICTION",
|
||||
NT_STATUS_LOGIN_WKSTA_RESTRICTION},
|
||||
{"NT_STATUS_IMAGE_MP_UP_MISMATCH", NT_STATUS_IMAGE_MP_UP_MISMATCH},
|
||||
{"NT_STATUS_INSUFFICIENT_LOGON_INFO",
|
||||
NT_STATUS_INSUFFICIENT_LOGON_INFO},
|
||||
{"NT_STATUS_BAD_DLL_ENTRYPOINT", NT_STATUS_BAD_DLL_ENTRYPOINT},
|
||||
{"NT_STATUS_BAD_SERVICE_ENTRYPOINT",
|
||||
NT_STATUS_BAD_SERVICE_ENTRYPOINT},
|
||||
{"NT_STATUS_LPC_REPLY_LOST", NT_STATUS_LPC_REPLY_LOST},
|
||||
{"NT_STATUS_IP_ADDRESS_CONFLICT1", NT_STATUS_IP_ADDRESS_CONFLICT1},
|
||||
{"NT_STATUS_IP_ADDRESS_CONFLICT2", NT_STATUS_IP_ADDRESS_CONFLICT2},
|
||||
{"NT_STATUS_REGISTRY_QUOTA_LIMIT", NT_STATUS_REGISTRY_QUOTA_LIMIT},
|
||||
{"NT_STATUS_PATH_NOT_COVERED", NT_STATUS_PATH_NOT_COVERED},
|
||||
{"NT_STATUS_NO_CALLBACK_ACTIVE", NT_STATUS_NO_CALLBACK_ACTIVE},
|
||||
{"NT_STATUS_LICENSE_QUOTA_EXCEEDED",
|
||||
NT_STATUS_LICENSE_QUOTA_EXCEEDED},
|
||||
{"NT_STATUS_PWD_TOO_SHORT", NT_STATUS_PWD_TOO_SHORT},
|
||||
{"NT_STATUS_PWD_TOO_RECENT", NT_STATUS_PWD_TOO_RECENT},
|
||||
{"NT_STATUS_PWD_HISTORY_CONFLICT", NT_STATUS_PWD_HISTORY_CONFLICT},
|
||||
{"NT_STATUS_PLUGPLAY_NO_DEVICE", NT_STATUS_PLUGPLAY_NO_DEVICE},
|
||||
{"NT_STATUS_UNSUPPORTED_COMPRESSION",
|
||||
NT_STATUS_UNSUPPORTED_COMPRESSION},
|
||||
{"NT_STATUS_INVALID_HW_PROFILE", NT_STATUS_INVALID_HW_PROFILE},
|
||||
{"NT_STATUS_INVALID_PLUGPLAY_DEVICE_PATH",
|
||||
NT_STATUS_INVALID_PLUGPLAY_DEVICE_PATH},
|
||||
{"NT_STATUS_DRIVER_ORDINAL_NOT_FOUND",
|
||||
NT_STATUS_DRIVER_ORDINAL_NOT_FOUND},
|
||||
{"NT_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND",
|
||||
NT_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND},
|
||||
{"NT_STATUS_RESOURCE_NOT_OWNED", NT_STATUS_RESOURCE_NOT_OWNED},
|
||||
{"NT_STATUS_TOO_MANY_LINKS", NT_STATUS_TOO_MANY_LINKS},
|
||||
{"NT_STATUS_QUOTA_LIST_INCONSISTENT",
|
||||
NT_STATUS_QUOTA_LIST_INCONSISTENT},
|
||||
{"NT_STATUS_FILE_IS_OFFLINE", NT_STATUS_FILE_IS_OFFLINE},
|
||||
{"NT_STATUS_VOLUME_DISMOUNTED", NT_STATUS_VOLUME_DISMOUNTED},
|
||||
{"NT_STATUS_NOT_A_REPARSE_POINT", NT_STATUS_NOT_A_REPARSE_POINT},
|
||||
{"NT_STATUS_DIRECTORY_IS_A_REPARSE_POINT",
|
||||
NT_STATUS_DIRECTORY_IS_A_REPARSE_POINT},
|
||||
{"NT_STATUS_ENCRYPTION_FAILED", NT_STATUS_ENCRYPTION_FAILED},
|
||||
{"NT_STATUS_DECRYPTION_FAILED", NT_STATUS_DECRYPTION_FAILED},
|
||||
{"NT_STATUS_RANGE_NOT_FOUND", NT_STATUS_RANGE_NOT_FOUND},
|
||||
{"NT_STATUS_NO_RECOVERY_POLICY", NT_STATUS_NO_RECOVERY_POLICY},
|
||||
{"NT_STATUS_NO_EFS", NT_STATUS_NO_EFS},
|
||||
{"NT_STATUS_WRONG_EFS", NT_STATUS_WRONG_EFS},
|
||||
{"NT_STATUS_NO_USER_KEYS", NT_STATUS_NO_USER_KEYS},
|
||||
{"NT_STATUS_VOLUME_NOT_UPGRADED", NT_STATUS_VOLUME_NOT_UPGRADED},
|
||||
{"NT_STATUS_NETWORK_SESSION_EXPIRED", NT_STATUS_NETWORK_SESSION_EXPIRED},
|
||||
{"NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES},
|
||||
{"NT_STATUS_MORE_ENTRIES", NT_STATUS_MORE_ENTRIES},
|
||||
{"NT_STATUS_SOME_NOT_MAPPED", NT_STATUS_SOME_NOT_MAPPED},
|
||||
{"NT_STATUS_NO_SUCH_JOB", NT_STATUS_NO_SUCH_JOB},
|
||||
{"NT_STATUS_NO_PREAUTH_INTEGRITY_HASH_OVERLAP",
|
||||
NT_STATUS_NO_PREAUTH_INTEGRITY_HASH_OVERLAP},
|
||||
{"NT_STATUS_OS2_INVALID_LEVEL", NT_STATUS_OS2_INVALID_LEVEL},
|
||||
{NULL, 0}
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,709 +6,104 @@
|
||||
*
|
||||
* Error mapping routines from Samba libsmb/errormap.c
|
||||
* Copyright (C) Andrew Tridgell 2001
|
||||
* Copyright (C) Luke Kenneth Casson Leighton 1997-2001.
|
||||
*/
|
||||
|
||||
#include <linux/bsearch.h>
|
||||
#include "cifsproto.h"
|
||||
#include "smb1proto.h"
|
||||
#include "smberr.h"
|
||||
#include "nterr.h"
|
||||
#include "cifs_debug.h"
|
||||
|
||||
struct smb_to_posix_error {
|
||||
__u16 smb_err;
|
||||
int posix_code;
|
||||
};
|
||||
static __always_inline int smb1_posix_error_cmp(const void *_key, const void *_pivot)
|
||||
{
|
||||
__u16 key = *(__u16 *)_key;
|
||||
const struct smb_to_posix_error *pivot = _pivot;
|
||||
|
||||
if (key < pivot->smb_err)
|
||||
return -1;
|
||||
if (key > pivot->smb_err)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct smb_to_posix_error mapping_table_ERRDOS[] = {
|
||||
{ERRbadfunc, -EINVAL},
|
||||
{ERRbadfile, -ENOENT},
|
||||
{ERRbadpath, -ENOTDIR},
|
||||
{ERRnofids, -EMFILE},
|
||||
{ERRnoaccess, -EACCES},
|
||||
{ERRbadfid, -EBADF},
|
||||
{ERRbadmcb, -EIO},
|
||||
{ERRnomem, -EREMOTEIO},
|
||||
{ERRbadmem, -EFAULT},
|
||||
{ERRbadenv, -EFAULT},
|
||||
{ERRbadformat, -EINVAL},
|
||||
{ERRbadaccess, -EACCES},
|
||||
{ERRbaddata, -EIO},
|
||||
{ERRbaddrive, -ENXIO},
|
||||
{ERRremcd, -EACCES},
|
||||
{ERRdiffdevice, -EXDEV},
|
||||
{ERRnofiles, -ENOENT},
|
||||
{ERRwriteprot, -EROFS},
|
||||
{ERRbadshare, -EBUSY},
|
||||
{ERRlock, -EACCES},
|
||||
{ERRunsup, -EINVAL},
|
||||
{ERRnosuchshare, -ENXIO},
|
||||
{ERRfilexists, -EEXIST},
|
||||
{ERRinvparm, -EINVAL},
|
||||
{ERRdiskfull, -ENOSPC},
|
||||
{ERRinvname, -ENOENT},
|
||||
{ERRunknownlevel, -EOPNOTSUPP},
|
||||
{ERRdirnotempty, -ENOTEMPTY},
|
||||
{ERRnotlocked, -ENOLCK},
|
||||
{ERRcancelviolation, -ENOLCK},
|
||||
{ERRalreadyexists, -EEXIST},
|
||||
{ERRmoredata, -EOVERFLOW},
|
||||
{ERReasnotsupported, -EOPNOTSUPP},
|
||||
{ErrQuota, -EDQUOT},
|
||||
{ErrNotALink, -ENOLINK},
|
||||
{ERRnetlogonNotStarted, -ENOPROTOOPT},
|
||||
{ERRsymlink, -EOPNOTSUPP},
|
||||
{ErrTooManyLinks, -EMLINK},
|
||||
{0, 0}
|
||||
/*
|
||||
* Automatically generated by the `gen_smb1_mapping` script,
|
||||
* sorted by DOS error code (ascending).
|
||||
*/
|
||||
#include "smb1_err_dos_map.c"
|
||||
};
|
||||
|
||||
static const struct smb_to_posix_error mapping_table_ERRSRV[] = {
|
||||
{ERRerror, -EIO},
|
||||
{ERRbadpw, -EACCES}, /* was EPERM */
|
||||
{ERRbadtype, -EREMOTE},
|
||||
{ERRaccess, -EACCES},
|
||||
{ERRinvtid, -ENXIO},
|
||||
{ERRinvnetname, -ENXIO},
|
||||
{ERRinvdevice, -ENXIO},
|
||||
{ERRqfull, -ENOSPC},
|
||||
{ERRqtoobig, -ENOSPC},
|
||||
{ERRqeof, -EIO},
|
||||
{ERRinvpfid, -EBADF},
|
||||
{ERRsmbcmd, -EBADRQC},
|
||||
{ERRsrverror, -EIO},
|
||||
{ERRbadBID, -EIO},
|
||||
{ERRfilespecs, -EINVAL},
|
||||
{ERRbadLink, -EIO},
|
||||
{ERRbadpermits, -EINVAL},
|
||||
{ERRbadPID, -ESRCH},
|
||||
{ERRsetattrmode, -EINVAL},
|
||||
{ERRpaused, -EHOSTDOWN},
|
||||
{ERRmsgoff, -EHOSTDOWN},
|
||||
{ERRnoroom, -ENOSPC},
|
||||
{ERRrmuns, -EUSERS},
|
||||
{ERRtimeout, -ETIME},
|
||||
{ERRnoresource, -EREMOTEIO},
|
||||
{ERRtoomanyuids, -EUSERS},
|
||||
{ERRbaduid, -EACCES},
|
||||
{ERRusempx, -EIO},
|
||||
{ERRusestd, -EIO},
|
||||
{ERR_NOTIFY_ENUM_DIR, -ENOBUFS},
|
||||
{ERRnoSuchUser, -EACCES},
|
||||
{ERRaccountexpired, -EKEYEXPIRED},
|
||||
{ERRbadclient, -EACCES},
|
||||
{ERRbadLogonTime, -EACCES},
|
||||
{ERRpasswordExpired, -EKEYEXPIRED},
|
||||
|
||||
{ERRnosupport, -EINVAL},
|
||||
{0, 0}
|
||||
/*
|
||||
* Automatically generated by the `gen_smb1_mapping` script,
|
||||
* sorted by SRV error code (ascending).
|
||||
*/
|
||||
#include "smb1_err_srv_map.c"
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
*convert a NT status code to a dos class/code
|
||||
*****************************************************************************/
|
||||
/* NT status -> dos error map */
|
||||
static const struct {
|
||||
__u8 dos_class;
|
||||
__u16 dos_code;
|
||||
__u32 ntstatus;
|
||||
} ntstatus_to_dos_map[] = {
|
||||
{
|
||||
ERRSRV, ERR_NOTIFY_ENUM_DIR, NT_STATUS_NOTIFY_ENUM_DIR}, {
|
||||
ERRDOS, ERRmoredata, NT_STATUS_BUFFER_OVERFLOW}, {
|
||||
ERRDOS, ERRmoredata, NT_STATUS_MORE_PROCESSING_REQUIRED}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_PRIVILEGE_NOT_HELD}, {
|
||||
ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL}, {
|
||||
ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED}, {
|
||||
ERRDOS, ERRbadpipe, NT_STATUS_INVALID_INFO_CLASS}, {
|
||||
ERRDOS, 24, NT_STATUS_INFO_LENGTH_MISMATCH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ACCESS_VIOLATION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_IN_PAGE_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PAGEFILE_QUOTA}, {
|
||||
ERRDOS, ERRbadfid, NT_STATUS_INVALID_HANDLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_INITIAL_STACK}, {
|
||||
ERRDOS, 193, NT_STATUS_BAD_INITIAL_PC}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_CID}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TIMER_NOT_CANCELED}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER}, {
|
||||
ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_DEVICE}, {
|
||||
ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_FILE}, {
|
||||
ERRDOS, ERRbadfunc, NT_STATUS_INVALID_DEVICE_REQUEST}, {
|
||||
ERRDOS, 38, NT_STATUS_END_OF_FILE}, {
|
||||
ERRDOS, 34, NT_STATUS_WRONG_VOLUME}, {
|
||||
ERRDOS, 21, NT_STATUS_NO_MEDIA_IN_DEVICE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNRECOGNIZED_MEDIA}, {
|
||||
ERRDOS, 27, NT_STATUS_NONEXISTENT_SECTOR},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_MORE_PROCESSING_REQUIRED to NT_STATUS_OK
|
||||
during the session setup } */
|
||||
{
|
||||
ERRDOS, ERRnomem, NT_STATUS_NO_MEMORY}, {
|
||||
ERRDOS, 487, NT_STATUS_CONFLICTING_ADDRESSES}, {
|
||||
ERRDOS, 487, NT_STATUS_NOT_MAPPED_VIEW}, {
|
||||
ERRDOS, 87, NT_STATUS_UNABLE_TO_FREE_VM}, {
|
||||
ERRDOS, 87, NT_STATUS_UNABLE_TO_DELETE_SECTION}, {
|
||||
ERRDOS, 2142, NT_STATUS_INVALID_SYSTEM_SERVICE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ILLEGAL_INSTRUCTION}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_INVALID_LOCK_SEQUENCE}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_INVALID_VIEW_SIZE}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_FILE_FOR_SECTION}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_ALREADY_COMMITTED},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_ACCESS_DENIED to NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE
|
||||
during the session setup } */
|
||||
{
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED}, {
|
||||
ERRDOS, 111, NT_STATUS_BUFFER_TOO_SMALL}, {
|
||||
ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NONCONTINUABLE_EXCEPTION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_DISPOSITION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNWIND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_STACK}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_UNWIND_TARGET}, {
|
||||
ERRDOS, 158, NT_STATUS_NOT_LOCKED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PARITY_ERROR}, {
|
||||
ERRDOS, 487, NT_STATUS_UNABLE_TO_DECOMMIT_VM}, {
|
||||
ERRDOS, 487, NT_STATUS_NOT_COMMITTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_PORT_ATTRIBUTES}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PORT_MESSAGE_TOO_LONG}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_MIX}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_QUOTA_LOWER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DISK_CORRUPT_ERROR}, {
|
||||
/* mapping changed since shell does lookup on * expects FileNotFound */
|
||||
ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_INVALID}, {
|
||||
ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND}, {
|
||||
ERRDOS, ERRalreadyexists, NT_STATUS_OBJECT_NAME_COLLISION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_HANDLE_NOT_WAITABLE}, {
|
||||
ERRDOS, ERRbadfid, NT_STATUS_PORT_DISCONNECTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DEVICE_ALREADY_ATTACHED}, {
|
||||
ERRDOS, 161, NT_STATUS_OBJECT_PATH_INVALID}, {
|
||||
ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND}, {
|
||||
ERRDOS, 161, NT_STATUS_OBJECT_PATH_SYNTAX_BAD}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DATA_OVERRUN}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DATA_LATE_ERROR}, {
|
||||
ERRDOS, 23, NT_STATUS_DATA_ERROR}, {
|
||||
ERRDOS, 23, NT_STATUS_CRC_ERROR}, {
|
||||
ERRDOS, ERRnomem, NT_STATUS_SECTION_TOO_BIG}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_PORT_CONNECTION_REFUSED}, {
|
||||
ERRDOS, ERRbadfid, NT_STATUS_INVALID_PORT_HANDLE}, {
|
||||
ERRDOS, ERRbadshare, NT_STATUS_SHARING_VIOLATION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_QUOTA_EXCEEDED}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PAGE_PROTECTION}, {
|
||||
ERRDOS, 288, NT_STATUS_MUTANT_NOT_OWNED}, {
|
||||
ERRDOS, 298, NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED}, {
|
||||
ERRDOS, 87, NT_STATUS_PORT_ALREADY_SET}, {
|
||||
ERRDOS, 87, NT_STATUS_SECTION_NOT_IMAGE}, {
|
||||
ERRDOS, 156, NT_STATUS_SUSPEND_COUNT_EXCEEDED}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_THREAD_IS_TERMINATING}, {
|
||||
ERRDOS, 87, NT_STATUS_BAD_WORKING_SET_LIMIT}, {
|
||||
ERRDOS, 87, NT_STATUS_INCOMPATIBLE_FILE_MAP}, {
|
||||
ERRDOS, 87, NT_STATUS_SECTION_PROTECTION}, {
|
||||
ERRDOS, ERReasnotsupported, NT_STATUS_EAS_NOT_SUPPORTED}, {
|
||||
ERRDOS, 255, NT_STATUS_EA_TOO_LARGE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NONEXISTENT_EA_ENTRY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_EAS_ON_FILE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_EA_CORRUPT_ERROR}, {
|
||||
ERRDOS, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, {
|
||||
ERRDOS, ERRlock, NT_STATUS_LOCK_NOT_GRANTED}, {
|
||||
ERRDOS, ERRbadfile, NT_STATUS_DELETE_PENDING}, {
|
||||
ERRDOS, ERRunsup, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNKNOWN_REVISION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REVISION_MISMATCH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_OWNER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_PRIMARY_GROUP}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_IMPERSONATION_TOKEN}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANT_DISABLE_MANDATORY}, {
|
||||
ERRDOS, 2215, NT_STATUS_NO_LOGON_SERVERS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_LOGON_SESSION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_PRIVILEGE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_ACCOUNT_NAME}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_USER_EXISTS},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_NO_SUCH_USER to NT_STATUS_LOGON_FAILURE
|
||||
during the session setup } */
|
||||
{
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NO_SUCH_USER}, { /* could map to 2238 */
|
||||
ERRHRD, ERRgeneral, NT_STATUS_GROUP_EXISTS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_GROUP}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MEMBER_IN_GROUP}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MEMBER_NOT_IN_GROUP}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LAST_ADMIN},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_WRONG_PASSWORD to NT_STATUS_LOGON_FAILURE
|
||||
during the session setup } */
|
||||
{
|
||||
ERRSRV, ERRbadpw, NT_STATUS_WRONG_PASSWORD}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ILL_FORMED_PASSWORD}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PASSWORD_RESTRICTION}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_LOGON_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ACCOUNT_RESTRICTION}, {
|
||||
ERRSRV, ERRbadLogonTime, NT_STATUS_INVALID_LOGON_HOURS}, {
|
||||
ERRSRV, ERRbadclient, NT_STATUS_INVALID_WORKSTATION}, {
|
||||
ERRSRV, ERRpasswordExpired, NT_STATUS_PASSWORD_EXPIRED}, {
|
||||
ERRSRV, ERRaccountexpired, NT_STATUS_ACCOUNT_DISABLED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NONE_MAPPED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_LUIDS_REQUESTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LUIDS_EXHAUSTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_SUB_AUTHORITY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_ACL}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_SID}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_SECURITY_DESCR}, {
|
||||
ERRDOS, 127, NT_STATUS_PROCEDURE_NOT_FOUND}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_IMAGE_FORMAT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_TOKEN}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_INHERITANCE_ACL}, {
|
||||
ERRDOS, 158, NT_STATUS_RANGE_NOT_LOCKED}, {
|
||||
ERRDOS, 112, NT_STATUS_DISK_FULL}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SERVER_DISABLED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SERVER_NOT_DISABLED}, {
|
||||
ERRDOS, 68, NT_STATUS_TOO_MANY_GUIDS_REQUESTED}, {
|
||||
ERRDOS, 259, NT_STATUS_GUIDS_EXHAUSTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_ID_AUTHORITY}, {
|
||||
ERRDOS, 259, NT_STATUS_AGENTS_EXHAUSTED}, {
|
||||
ERRDOS, 154, NT_STATUS_INVALID_VOLUME_LABEL}, {
|
||||
ERRDOS, 14, NT_STATUS_SECTION_NOT_EXTENDED}, {
|
||||
ERRDOS, 487, NT_STATUS_NOT_MAPPED_DATA}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RESOURCE_DATA_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RESOURCE_TYPE_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RESOURCE_NAME_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ARRAY_BOUNDS_EXCEEDED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_DENORMAL_OPERAND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_DIVIDE_BY_ZERO}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_INEXACT_RESULT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_INVALID_OPERATION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_OVERFLOW}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_STACK_CHECK}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOAT_UNDERFLOW}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INTEGER_DIVIDE_BY_ZERO}, {
|
||||
ERRDOS, 534, NT_STATUS_INTEGER_OVERFLOW}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PRIVILEGED_INSTRUCTION}, {
|
||||
ERRDOS, ERRnomem, NT_STATUS_TOO_MANY_PAGING_FILES}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FILE_INVALID}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ALLOTTED_SPACE_EXCEEDED},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_INSUFFICIENT_RESOURCES to
|
||||
NT_STATUS_INSUFF_SERVER_RESOURCES during the session setup } */
|
||||
{
|
||||
ERRDOS, ERRnoresource, NT_STATUS_INSUFFICIENT_RESOURCES}, {
|
||||
ERRDOS, ERRbadpath, NT_STATUS_DFS_EXIT_PATH_FOUND}, {
|
||||
ERRDOS, 23, NT_STATUS_DEVICE_DATA_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DEVICE_NOT_CONNECTED}, {
|
||||
ERRDOS, 21, NT_STATUS_DEVICE_POWER_FAILURE}, {
|
||||
ERRDOS, 487, NT_STATUS_FREE_VM_NOT_AT_BASE}, {
|
||||
ERRDOS, 487, NT_STATUS_MEMORY_NOT_ALLOCATED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_WORKING_SET_QUOTA}, {
|
||||
ERRDOS, 19, NT_STATUS_MEDIA_WRITE_PROTECTED}, {
|
||||
ERRDOS, 21, NT_STATUS_DEVICE_NOT_READY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_GROUP_ATTRIBUTES}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_IMPERSONATION_LEVEL}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANT_OPEN_ANONYMOUS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_VALIDATION_CLASS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_TOKEN_TYPE}, {
|
||||
ERRDOS, 87, NT_STATUS_BAD_MASTER_BOOT_RECORD}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INSTRUCTION_MISALIGNMENT}, {
|
||||
ERRDOS, ERRpipebusy, NT_STATUS_INSTANCE_NOT_AVAILABLE}, {
|
||||
ERRDOS, ERRpipebusy, NT_STATUS_PIPE_NOT_AVAILABLE}, {
|
||||
ERRDOS, ERRbadpipe, NT_STATUS_INVALID_PIPE_STATE}, {
|
||||
ERRDOS, ERRpipebusy, NT_STATUS_PIPE_BUSY}, {
|
||||
ERRDOS, ERRbadfunc, NT_STATUS_ILLEGAL_FUNCTION}, {
|
||||
ERRDOS, ERRnotconnected, NT_STATUS_PIPE_DISCONNECTED}, {
|
||||
ERRDOS, ERRpipeclosing, NT_STATUS_PIPE_CLOSING}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PIPE_CONNECTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PIPE_LISTENING}, {
|
||||
ERRDOS, ERRbadpipe, NT_STATUS_INVALID_READ_MODE}, {
|
||||
ERRDOS, 121, NT_STATUS_IO_TIMEOUT}, {
|
||||
ERRDOS, 38, NT_STATUS_FILE_FORCED_CLOSED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PROFILING_NOT_STARTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PROFILING_NOT_STOPPED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_COULD_NOT_INTERPRET}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_FILE_IS_A_DIRECTORY}, {
|
||||
ERRDOS, ERRunsup, NT_STATUS_NOT_SUPPORTED}, {
|
||||
ERRDOS, 51, NT_STATUS_REMOTE_NOT_LISTENING}, {
|
||||
ERRDOS, 52, NT_STATUS_DUPLICATE_NAME}, {
|
||||
ERRDOS, 53, NT_STATUS_BAD_NETWORK_PATH}, {
|
||||
ERRDOS, 54, NT_STATUS_NETWORK_BUSY}, {
|
||||
ERRDOS, 55, NT_STATUS_DEVICE_DOES_NOT_EXIST}, {
|
||||
ERRDOS, 56, NT_STATUS_TOO_MANY_COMMANDS}, {
|
||||
ERRDOS, 57, NT_STATUS_ADAPTER_HARDWARE_ERROR}, {
|
||||
ERRDOS, 58, NT_STATUS_INVALID_NETWORK_RESPONSE}, {
|
||||
ERRDOS, 59, NT_STATUS_UNEXPECTED_NETWORK_ERROR}, {
|
||||
ERRDOS, 60, NT_STATUS_BAD_REMOTE_ADAPTER}, {
|
||||
ERRDOS, 61, NT_STATUS_PRINT_QUEUE_FULL}, {
|
||||
ERRDOS, 62, NT_STATUS_NO_SPOOL_SPACE}, {
|
||||
ERRDOS, 63, NT_STATUS_PRINT_CANCELLED}, {
|
||||
ERRDOS, 64, NT_STATUS_NETWORK_NAME_DELETED}, {
|
||||
ERRDOS, 65, NT_STATUS_NETWORK_ACCESS_DENIED}, {
|
||||
ERRDOS, 66, NT_STATUS_BAD_DEVICE_TYPE}, {
|
||||
ERRDOS, ERRnosuchshare, NT_STATUS_BAD_NETWORK_NAME}, {
|
||||
ERRDOS, 68, NT_STATUS_TOO_MANY_NAMES}, {
|
||||
ERRDOS, 69, NT_STATUS_TOO_MANY_SESSIONS}, {
|
||||
ERRDOS, 70, NT_STATUS_SHARING_PAUSED}, {
|
||||
ERRDOS, 71, NT_STATUS_REQUEST_NOT_ACCEPTED}, {
|
||||
ERRDOS, 72, NT_STATUS_REDIRECTOR_PAUSED}, {
|
||||
ERRDOS, 88, NT_STATUS_NET_WRITE_FAULT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PROFILING_AT_LIMIT}, {
|
||||
ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_FILE_RENAMED}, {
|
||||
ERRDOS, 240, NT_STATUS_VIRTUAL_CIRCUIT_CLOSED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SECURITY_ON_OBJECT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANT_WAIT}, {
|
||||
ERRDOS, ERRpipeclosing, NT_STATUS_PIPE_EMPTY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANT_ACCESS_DOMAIN_INFO}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANT_TERMINATE_SELF}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_SERVER_STATE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_DOMAIN_STATE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_DOMAIN_ROLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_DOMAIN}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DOMAIN_EXISTS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DOMAIN_LIMIT_EXCEEDED}, {
|
||||
ERRDOS, 300, NT_STATUS_OPLOCK_NOT_GRANTED}, {
|
||||
ERRDOS, 301, NT_STATUS_INVALID_OPLOCK_PROTOCOL}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INTERNAL_DB_CORRUPTION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INTERNAL_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_GENERIC_NOT_MAPPED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_DESCRIPTOR_FORMAT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_USER_BUFFER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNEXPECTED_IO_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNEXPECTED_MM_CREATE_ERR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNEXPECTED_MM_MAP_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNEXPECTED_MM_EXTEND_ERR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NOT_LOGON_PROCESS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOGON_SESSION_EXISTS}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_1}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_2}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_3}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_4}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_5}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_6}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_7}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_8}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_9}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_10}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_11}, {
|
||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_12}, {
|
||||
ERRDOS, ERRbadpath, NT_STATUS_REDIRECTOR_NOT_STARTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REDIRECTOR_STARTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_STACK_OVERFLOW}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_PACKAGE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_FUNCTION_TABLE}, {
|
||||
ERRDOS, 203, NT_STATUS_VARIABLE_NOT_FOUND}, {
|
||||
ERRDOS, 145, NT_STATUS_DIRECTORY_NOT_EMPTY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FILE_CORRUPT_ERROR}, {
|
||||
ERRDOS, 267, NT_STATUS_NOT_A_DIRECTORY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_LOGON_SESSION_STATE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOGON_SESSION_COLLISION}, {
|
||||
ERRDOS, 206, NT_STATUS_NAME_TOO_LONG}, {
|
||||
ERRDOS, 2401, NT_STATUS_FILES_OPEN}, {
|
||||
ERRDOS, 2404, NT_STATUS_CONNECTION_IN_USE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MESSAGE_NOT_FOUND}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_PROCESS_IS_TERMINATING}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_LOGON_TYPE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_GUID_TRANSLATION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANNOT_IMPERSONATE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_IMAGE_ALREADY_LOADED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_NOT_PRESENT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_LID_NOT_EXIST}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_LID_ALREADY_OWNED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_NOT_LID_OWNER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_INVALID_COMMAND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_INVALID_LID}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ABIOS_INVALID_SELECTOR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_LDT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_LDT_SIZE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_LDT_OFFSET}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_LDT_DESCRIPTOR}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_IMAGE_NE_FORMAT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RXACT_INVALID_STATE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RXACT_COMMIT_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MAPPED_FILE_SIZE_ZERO}, {
|
||||
ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANCELLED}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_CANNOT_DELETE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_COMPUTER_NAME}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_FILE_DELETED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SPECIAL_ACCOUNT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SPECIAL_GROUP}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SPECIAL_USER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MEMBERS_PRIMARY_GROUP}, {
|
||||
ERRDOS, ERRbadfid, NT_STATUS_FILE_CLOSED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_THREADS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_THREAD_NOT_IN_PROCESS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TOKEN_ALREADY_IN_USE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PAGEFILE_QUOTA_EXCEEDED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_COMMITMENT_LIMIT}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_IMAGE_LE_FORMAT}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_IMAGE_NOT_MZ}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_IMAGE_PROTECT}, {
|
||||
ERRDOS, 193, NT_STATUS_INVALID_IMAGE_WIN_16}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOGON_SERVER_CONFLICT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TIME_DIFFERENCE_AT_DC}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SYNCHRONIZATION_REQUIRED}, {
|
||||
ERRDOS, 126, NT_STATUS_DLL_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_OPEN_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_IO_PRIVILEGE_FAILED}, {
|
||||
ERRDOS, 182, NT_STATUS_ORDINAL_NOT_FOUND}, {
|
||||
ERRDOS, 127, NT_STATUS_ENTRYPOINT_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONTROL_C_EXIT}, {
|
||||
ERRDOS, 64, NT_STATUS_LOCAL_DISCONNECT}, {
|
||||
ERRDOS, 64, NT_STATUS_REMOTE_DISCONNECT}, {
|
||||
ERRDOS, 51, NT_STATUS_REMOTE_RESOURCES}, {
|
||||
ERRDOS, 59, NT_STATUS_LINK_FAILED}, {
|
||||
ERRDOS, 59, NT_STATUS_LINK_TIMEOUT}, {
|
||||
ERRDOS, 59, NT_STATUS_INVALID_CONNECTION}, {
|
||||
ERRDOS, 59, NT_STATUS_INVALID_ADDRESS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DLL_INIT_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MISSING_SYSTEMFILE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNHANDLED_EXCEPTION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_APP_INIT_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PAGEFILE_CREATE_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_PAGEFILE}, {
|
||||
ERRDOS, 124, NT_STATUS_INVALID_LEVEL}, {
|
||||
ERRDOS, 86, NT_STATUS_WRONG_PASSWORD_CORE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ILLEGAL_FLOAT_CONTEXT}, {
|
||||
ERRDOS, 109, NT_STATUS_PIPE_BROKEN}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REGISTRY_CORRUPT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REGISTRY_IO_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_EVENT_PAIR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNRECOGNIZED_VOLUME}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SERIAL_NO_DEVICE_INITED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_ALIAS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MEMBER_NOT_IN_ALIAS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MEMBER_IN_ALIAS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ALIAS_EXISTS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOGON_NOT_GRANTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_SECRETS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SECRET_TOO_LONG}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INTERNAL_DB_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FULLSCREEN_MODE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_CONTEXT_IDS}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_LOGON_TYPE_NOT_GRANTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NOT_REGISTRY_FILE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NT_CROSS_ENCRYPTION_REQUIRED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DOMAIN_CTRLR_CONFIG_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FT_MISSING_MEMBER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ILL_FORMED_SERVICE_ENTRY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ILLEGAL_CHARACTER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNMAPPABLE_CHARACTER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNDEFINED_CHARACTER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOPPY_VOLUME}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOPPY_ID_MARK_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOPPY_WRONG_CYLINDER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOPPY_UNKNOWN_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FLOPPY_BAD_REGISTERS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DISK_RECALIBRATE_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DISK_OPERATION_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DISK_RESET_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SHARED_IRQ_BUSY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FT_ORPHANING}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PARTITION_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_BLOCK_LENGTH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DEVICE_NOT_PARTITIONED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNABLE_TO_LOCK_MEDIA}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNABLE_TO_UNLOAD_MEDIA}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_EOM_OVERFLOW}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_MEDIA}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_SUCH_MEMBER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_MEMBER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_KEY_DELETED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_LOG_SPACE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TOO_MANY_SIDS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LM_CROSS_ENCRYPTION_REQUIRED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_KEY_HAS_CHILDREN}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CHILD_MUST_BE_VOLATILE}, {
|
||||
ERRDOS, 87, NT_STATUS_DEVICE_CONFIGURATION_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DRIVER_INTERNAL_ERROR}, {
|
||||
ERRDOS, 22, NT_STATUS_INVALID_DEVICE_STATE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_IO_DEVICE_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DEVICE_PROTOCOL_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BACKUP_CONTROLLER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOG_FILE_FULL}, {
|
||||
ERRDOS, 19, NT_STATUS_TOO_LATE}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NO_TRUST_LSA_SECRET},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_NO_TRUST_SAM_ACCOUNT to
|
||||
NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE during the session setup } */
|
||||
{
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NO_TRUST_SAM_ACCOUNT}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_TRUSTED_DOMAIN_FAILURE}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_EVENTLOG_FILE_CORRUPT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_EVENTLOG_CANT_START}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_TRUST_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MUTANT_LIMIT_EXCEEDED}, {
|
||||
ERRDOS, ERRnetlogonNotStarted, NT_STATUS_NETLOGON_NOT_STARTED}, {
|
||||
ERRSRV, ERRaccountexpired, NT_STATUS_ACCOUNT_EXPIRED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_POSSIBLE_DEADLOCK}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NETWORK_CREDENTIAL_CONFLICT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REMOTE_SESSION_LIMIT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_EVENTLOG_FILE_CHANGED}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT},
|
||||
/* { This NT error code was 'sqashed'
|
||||
from NT_STATUS_DOMAIN_TRUST_INCONSISTENT to NT_STATUS_LOGON_FAILURE
|
||||
during the session setup } */
|
||||
{
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_DOMAIN_TRUST_INCONSISTENT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FS_DRIVER_REQUIRED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_USER_SESSION_KEY}, {
|
||||
ERRDOS, 59, NT_STATUS_USER_SESSION_DELETED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RESOURCE_LANG_NOT_FOUND}, {
|
||||
ERRDOS, ERRnoresource, NT_STATUS_INSUFF_SERVER_RESOURCES}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_BUFFER_SIZE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_ADDRESS_COMPONENT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_ADDRESS_WILDCARD}, {
|
||||
ERRDOS, 68, NT_STATUS_TOO_MANY_ADDRESSES}, {
|
||||
ERRDOS, 52, NT_STATUS_ADDRESS_ALREADY_EXISTS}, {
|
||||
ERRDOS, 64, NT_STATUS_ADDRESS_CLOSED}, {
|
||||
ERRDOS, 64, NT_STATUS_CONNECTION_DISCONNECTED}, {
|
||||
ERRDOS, 64, NT_STATUS_CONNECTION_RESET}, {
|
||||
ERRDOS, 68, NT_STATUS_TOO_MANY_NODES}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_ABORTED}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_TIMED_OUT}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_NO_RELEASE}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_NO_MATCH}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_RESPONDED}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_INVALID_ID}, {
|
||||
ERRDOS, 59, NT_STATUS_TRANSACTION_INVALID_TYPE}, {
|
||||
ERRDOS, ERRunsup, NT_STATUS_NOT_SERVER_SESSION}, {
|
||||
ERRDOS, ERRunsup, NT_STATUS_NOT_CLIENT_SESSION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CANNOT_LOAD_REGISTRY_FILE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DEBUG_ATTACH_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_SYSTEM_PROCESS_TERMINATED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DATA_NOT_ACCEPTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_BROWSER_SERVERS_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_VDM_HARD_ERROR}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DRIVER_CANCEL_TIMEOUT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REPLY_MESSAGE_MISMATCH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MAPPED_ALIGNMENT}, {
|
||||
ERRDOS, 193, NT_STATUS_IMAGE_CHECKSUM_MISMATCH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOST_WRITEBEHIND_DATA}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID}, {
|
||||
ERRSRV, ERRpasswordExpired, NT_STATUS_PASSWORD_MUST_CHANGE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NOT_TINY_STREAM}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RECOVERY_FAILURE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_STACK_OVERFLOW_READ}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FAIL_CHECK}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DUPLICATE_OBJECTID}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_OBJECTID_EXISTS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONVERT_TO_LARGE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RETRY}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FOUND_OUT_OF_SCOPE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ALLOCATE_BUCKET}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PROPSET_NOT_FOUND}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_MARSHALL_OVERFLOW}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_VARIANT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_ACCOUNT_LOCKED_OUT}, {
|
||||
ERRDOS, ERRbadfid, NT_STATUS_HANDLE_NOT_CLOSABLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_REFUSED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_GRACEFUL_DISCONNECT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ADDRESS_ALREADY_ASSOCIATED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_ADDRESS_NOT_ASSOCIATED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_INVALID}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_ACTIVE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NETWORK_UNREACHABLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_HOST_UNREACHABLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PROTOCOL_UNREACHABLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PORT_UNREACHABLE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REQUEST_ABORTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_ABORTED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_COMPRESSION_BUFFER}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_USER_MAPPED_FILE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_AUDIT_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_TIMER_RESOLUTION_NOT_SET}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_CONNECTION_COUNT_LIMIT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOGIN_TIME_RESTRICTION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LOGIN_WKSTA_RESTRICTION}, {
|
||||
ERRDOS, 193, NT_STATUS_IMAGE_MP_UP_MISMATCH}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INSUFFICIENT_LOGON_INFO}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_DLL_ENTRYPOINT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_BAD_SERVICE_ENTRYPOINT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LPC_REPLY_LOST}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_IP_ADDRESS_CONFLICT1}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_IP_ADDRESS_CONFLICT2}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_REGISTRY_QUOTA_LIMIT}, {
|
||||
ERRSRV, 3, NT_STATUS_PATH_NOT_COVERED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_NO_CALLBACK_ACTIVE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_LICENSE_QUOTA_EXCEEDED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PWD_TOO_SHORT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PWD_TOO_RECENT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PWD_HISTORY_CONFLICT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_PLUGPLAY_NO_DEVICE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_UNSUPPORTED_COMPRESSION}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_HW_PROFILE}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_PLUGPLAY_DEVICE_PATH}, {
|
||||
ERRDOS, 182, NT_STATUS_DRIVER_ORDINAL_NOT_FOUND}, {
|
||||
ERRDOS, 127, NT_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND}, {
|
||||
ERRDOS, 288, NT_STATUS_RESOURCE_NOT_OWNED}, {
|
||||
ERRDOS, ErrTooManyLinks, NT_STATUS_TOO_MANY_LINKS}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_QUOTA_LIST_INCONSISTENT}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_FILE_IS_OFFLINE}, {
|
||||
ERRDOS, 21, NT_STATUS_VOLUME_DISMOUNTED}, {
|
||||
ERRDOS, 161, NT_STATUS_DIRECTORY_IS_A_REPARSE_POINT}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_ENCRYPTION_FAILED}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_DECRYPTION_FAILED}, {
|
||||
ERRHRD, ERRgeneral, NT_STATUS_RANGE_NOT_FOUND}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NO_RECOVERY_POLICY}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NO_EFS}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_WRONG_EFS}, {
|
||||
ERRDOS, ERRnoaccess, NT_STATUS_NO_USER_KEYS}, {
|
||||
ERRDOS, ERRbadfunc, NT_STATUS_VOLUME_NOT_UPGRADED}, {
|
||||
ERRDOS, ERRsymlink, NT_STATUS_STOPPED_ON_SYMLINK}, {
|
||||
ERRDOS, ERRunknownlevel, NT_STATUS_OS2_INVALID_LEVEL}, {
|
||||
0, 0, 0 }
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
Print an error message from the status code
|
||||
*****************************************************************************/
|
||||
static void
|
||||
cifs_print_status(__u32 status_code)
|
||||
static __always_inline int ntstatus_to_dos_cmp(const void *_key, const void *_pivot)
|
||||
{
|
||||
int idx = 0;
|
||||
__u32 key = *(__u32 *)_key;
|
||||
const struct ntstatus_to_dos_err *pivot = _pivot;
|
||||
|
||||
while (nt_errs[idx].nt_errstr != NULL) {
|
||||
if (nt_errs[idx].nt_errcode == status_code) {
|
||||
pr_notice("Status code returned 0x%08x %s\n",
|
||||
status_code, nt_errs[idx].nt_errstr);
|
||||
return;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return;
|
||||
if (key < pivot->ntstatus)
|
||||
return -1;
|
||||
if (key > pivot->ntstatus)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* NT status -> dos error map */
|
||||
static const struct ntstatus_to_dos_err ntstatus_to_dos_map[] = {
|
||||
/*
|
||||
* Automatically generated by the `gen_smb1_mapping` script,
|
||||
* sorted by NT status code (ascending).
|
||||
*/
|
||||
#include "smb1_mapping_table.c"
|
||||
};
|
||||
|
||||
static void
|
||||
ntstatus_to_dos(__u32 ntstatus, __u8 *eclass, __u16 *ecode)
|
||||
static const struct ntstatus_to_dos_err *
|
||||
search_ntstatus_to_dos_map(__u32 ntstatus)
|
||||
{
|
||||
int i;
|
||||
if (ntstatus == 0) {
|
||||
*eclass = 0;
|
||||
*ecode = 0;
|
||||
return;
|
||||
}
|
||||
for (i = 0; ntstatus_to_dos_map[i].ntstatus; i++) {
|
||||
if (ntstatus == ntstatus_to_dos_map[i].ntstatus) {
|
||||
*eclass = ntstatus_to_dos_map[i].dos_class;
|
||||
*ecode = ntstatus_to_dos_map[i].dos_code;
|
||||
return;
|
||||
}
|
||||
}
|
||||
*eclass = ERRHRD;
|
||||
*ecode = ERRgeneral;
|
||||
return __inline_bsearch(&ntstatus, ntstatus_to_dos_map,
|
||||
ARRAY_SIZE(ntstatus_to_dos_map),
|
||||
sizeof(struct ntstatus_to_dos_err),
|
||||
ntstatus_to_dos_cmp);
|
||||
}
|
||||
|
||||
static const struct smb_to_posix_error *
|
||||
search_mapping_table_ERRDOS(__u16 smb_err)
|
||||
{
|
||||
return __inline_bsearch(&smb_err, mapping_table_ERRDOS,
|
||||
ARRAY_SIZE(mapping_table_ERRDOS),
|
||||
sizeof(struct smb_to_posix_error),
|
||||
smb1_posix_error_cmp);
|
||||
}
|
||||
|
||||
static const struct smb_to_posix_error *
|
||||
search_mapping_table_ERRSRV(__u16 smb_err)
|
||||
{
|
||||
return __inline_bsearch(&smb_err, mapping_table_ERRSRV,
|
||||
ARRAY_SIZE(mapping_table_ERRSRV),
|
||||
sizeof(struct smb_to_posix_error),
|
||||
smb1_posix_error_cmp);
|
||||
}
|
||||
|
||||
int
|
||||
map_smb_to_linux_error(char *buf, bool logErr)
|
||||
{
|
||||
struct smb_hdr *smb = (struct smb_hdr *)buf;
|
||||
unsigned int i;
|
||||
int rc = -EIO; /* if transport error smb error may not be set */
|
||||
__u8 smberrclass;
|
||||
__u16 smberrcode;
|
||||
const struct smb_to_posix_error *err_map = NULL;
|
||||
|
||||
/* BB if NT Status codes - map NT BB */
|
||||
|
||||
@@ -720,11 +115,20 @@ map_smb_to_linux_error(char *buf, bool logErr)
|
||||
/* translate the newer STATUS codes to old style SMB errors
|
||||
* and then to POSIX errors */
|
||||
__u32 err = le32_to_cpu(smb->Status.CifsError);
|
||||
if (logErr && (err != (NT_STATUS_MORE_PROCESSING_REQUIRED)))
|
||||
cifs_print_status(err);
|
||||
else if (cifsFYI & CIFS_RC)
|
||||
cifs_print_status(err);
|
||||
ntstatus_to_dos(err, &smberrclass, &smberrcode);
|
||||
const struct ntstatus_to_dos_err *map = search_ntstatus_to_dos_map(err);
|
||||
|
||||
if (map) {
|
||||
if ((logErr && err != NT_STATUS_MORE_PROCESSING_REQUIRED) ||
|
||||
(cifsFYI & CIFS_RC))
|
||||
pr_notice("Status code returned 0x%08x %s\n",
|
||||
map->ntstatus, map->nt_errstr);
|
||||
|
||||
smberrclass = map->dos_class;
|
||||
smberrcode = map->dos_code;
|
||||
} else {
|
||||
smberrclass = ERRHRD;
|
||||
smberrcode = ERRgeneral;
|
||||
}
|
||||
} else {
|
||||
smberrclass = smb->Status.DosError.ErrorClass;
|
||||
smberrcode = le16_to_cpu(smb->Status.DosError.Error);
|
||||
@@ -732,38 +136,16 @@ map_smb_to_linux_error(char *buf, bool logErr)
|
||||
|
||||
/* old style errors */
|
||||
|
||||
/* DOS class smb error codes - map DOS */
|
||||
if (smberrclass == ERRDOS) {
|
||||
/* DOS class smb error codes - map DOS */
|
||||
/* 1 byte field no need to byte reverse */
|
||||
for (i = 0;
|
||||
i <
|
||||
sizeof(mapping_table_ERRDOS) /
|
||||
sizeof(struct smb_to_posix_error); i++) {
|
||||
if (mapping_table_ERRDOS[i].smb_err == 0)
|
||||
break;
|
||||
else if (mapping_table_ERRDOS[i].smb_err ==
|
||||
smberrcode) {
|
||||
rc = mapping_table_ERRDOS[i].posix_code;
|
||||
break;
|
||||
}
|
||||
/* else try next error mapping one to see if match */
|
||||
}
|
||||
err_map = search_mapping_table_ERRDOS(smberrcode);
|
||||
} else if (smberrclass == ERRSRV) {
|
||||
/* server class of error codes */
|
||||
for (i = 0;
|
||||
i <
|
||||
sizeof(mapping_table_ERRSRV) /
|
||||
sizeof(struct smb_to_posix_error); i++) {
|
||||
if (mapping_table_ERRSRV[i].smb_err == 0)
|
||||
break;
|
||||
else if (mapping_table_ERRSRV[i].smb_err ==
|
||||
smberrcode) {
|
||||
rc = mapping_table_ERRSRV[i].posix_code;
|
||||
break;
|
||||
}
|
||||
/* else try next error mapping to see if match */
|
||||
}
|
||||
err_map = search_mapping_table_ERRSRV(smberrcode);
|
||||
}
|
||||
if (err_map)
|
||||
rc = err_map->posix_code;
|
||||
/* else ERRHRD class errors or junk - return EIO */
|
||||
|
||||
/* special cases for NT status codes which cannot be translated to DOS codes */
|
||||
@@ -811,3 +193,94 @@ map_and_check_smb_error(struct TCP_Server_Info *server,
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#define DEFINE_CHECK_SORT_FUNC(__array, __field) \
|
||||
static int __init __array ## _is_sorted(void) \
|
||||
{ \
|
||||
unsigned int i; \
|
||||
\
|
||||
/* Check whether the array is sorted in ascending order */ \
|
||||
for (i = 1; i < ARRAY_SIZE(__array); i++) { \
|
||||
if (__array[i].__field >= \
|
||||
__array[i - 1].__field) \
|
||||
continue; \
|
||||
\
|
||||
pr_err(#__array " array order is incorrect\n"); \
|
||||
return -EINVAL; \
|
||||
} \
|
||||
\
|
||||
return 0; \
|
||||
}
|
||||
|
||||
/* ntstatus_to_dos_map_is_sorted */
|
||||
DEFINE_CHECK_SORT_FUNC(ntstatus_to_dos_map, ntstatus);
|
||||
/* mapping_table_ERRDOS_is_sorted */
|
||||
DEFINE_CHECK_SORT_FUNC(mapping_table_ERRDOS, smb_err);
|
||||
/* mapping_table_ERRSRV_is_sorted */
|
||||
DEFINE_CHECK_SORT_FUNC(mapping_table_ERRSRV, smb_err);
|
||||
|
||||
int __init smb1_init_maperror(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = ntstatus_to_dos_map_is_sorted();
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = mapping_table_ERRDOS_is_sorted();
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = mapping_table_ERRSRV_is_sorted();
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_SMB1_KUNIT_TESTS)
|
||||
#define EXPORT_SYMBOL_FOR_SMB_TEST(sym) \
|
||||
EXPORT_SYMBOL_FOR_MODULES(sym, "smb1maperror_test")
|
||||
|
||||
const struct ntstatus_to_dos_err *
|
||||
search_ntstatus_to_dos_map_test(__u32 ntstatus)
|
||||
{
|
||||
return search_ntstatus_to_dos_map(ntstatus);
|
||||
}
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(search_ntstatus_to_dos_map_test);
|
||||
|
||||
const struct ntstatus_to_dos_err *
|
||||
ntstatus_to_dos_map_test = ntstatus_to_dos_map;
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(ntstatus_to_dos_map_test);
|
||||
|
||||
unsigned int ntstatus_to_dos_num = ARRAY_SIZE(ntstatus_to_dos_map);
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(ntstatus_to_dos_num);
|
||||
|
||||
const struct smb_to_posix_error *
|
||||
search_mapping_table_ERRDOS_test(__u16 smb_err)
|
||||
{
|
||||
return search_mapping_table_ERRDOS(smb_err);
|
||||
}
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(search_mapping_table_ERRDOS_test);
|
||||
|
||||
const struct smb_to_posix_error *
|
||||
mapping_table_ERRDOS_test = mapping_table_ERRDOS;
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(mapping_table_ERRDOS_test);
|
||||
|
||||
unsigned int mapping_table_ERRDOS_num = ARRAY_SIZE(mapping_table_ERRDOS);
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(mapping_table_ERRDOS_num);
|
||||
|
||||
const struct smb_to_posix_error *
|
||||
search_mapping_table_ERRSRV_test(__u16 smb_err)
|
||||
{
|
||||
return search_mapping_table_ERRSRV(smb_err);
|
||||
}
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(search_mapping_table_ERRSRV_test);
|
||||
|
||||
const struct smb_to_posix_error *
|
||||
mapping_table_ERRSRV_test = mapping_table_ERRSRV;
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(mapping_table_ERRSRV_test);
|
||||
|
||||
unsigned int mapping_table_ERRSRV_num = ARRAY_SIZE(mapping_table_ERRSRV);
|
||||
EXPORT_SYMBOL_FOR_SMB_TEST(mapping_table_ERRSRV_num);
|
||||
#endif
|
||||
|
||||
77
fs/smb/client/smb1maperror_test.c
Normal file
77
fs/smb/client/smb1maperror_test.c
Normal file
@@ -0,0 +1,77 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
*
|
||||
* KUnit tests of SMB1 maperror
|
||||
*
|
||||
* Copyright (C) 2026 KylinSoft Co., Ltd. All rights reserved.
|
||||
* Author(s): Youling Tang <tangyouling@kylinos.cn>
|
||||
* ChenXiaoSong <chenxiaosong@kylinos.cn>
|
||||
*
|
||||
*/
|
||||
|
||||
#include <kunit/test.h>
|
||||
#include "smb1proto.h"
|
||||
#include "nterr.h"
|
||||
#include "smberr.h"
|
||||
|
||||
#define DEFINE_CHECK_SEARCH_FUNC(__struct_name, __field, \
|
||||
__array, __num) \
|
||||
static void check_search_ ## __array(struct kunit *test) \
|
||||
{ \
|
||||
unsigned int i; \
|
||||
const struct __struct_name *expect, *result; \
|
||||
\
|
||||
for (i = 0; i < __num; i++) { \
|
||||
expect = &__array ## _test[i]; \
|
||||
result = search_ ## __array ## _test(expect->__field); \
|
||||
KUNIT_ASSERT_NOT_NULL(test, result); \
|
||||
test_cmp_ ## __struct_name(test, expect, result); \
|
||||
} \
|
||||
}
|
||||
|
||||
static void
|
||||
test_cmp_ntstatus_to_dos_err(struct kunit *test,
|
||||
const struct ntstatus_to_dos_err *expect,
|
||||
const struct ntstatus_to_dos_err *result)
|
||||
{
|
||||
KUNIT_EXPECT_EQ(test, expect->dos_class, result->dos_class);
|
||||
KUNIT_EXPECT_EQ(test, expect->dos_code, result->dos_code);
|
||||
KUNIT_EXPECT_EQ(test, expect->ntstatus, result->ntstatus);
|
||||
KUNIT_EXPECT_STREQ(test, expect->nt_errstr, result->nt_errstr);
|
||||
}
|
||||
|
||||
static void
|
||||
test_cmp_smb_to_posix_error(struct kunit *test,
|
||||
const struct smb_to_posix_error *expect,
|
||||
const struct smb_to_posix_error *result)
|
||||
{
|
||||
KUNIT_EXPECT_EQ(test, expect->smb_err, result->smb_err);
|
||||
KUNIT_EXPECT_EQ(test, expect->posix_code, result->posix_code);
|
||||
}
|
||||
|
||||
/* check_search_ntstatus_to_dos_map */
|
||||
DEFINE_CHECK_SEARCH_FUNC(ntstatus_to_dos_err, ntstatus, ntstatus_to_dos_map,
|
||||
ntstatus_to_dos_num);
|
||||
/* check_search_mapping_table_ERRDOS */
|
||||
DEFINE_CHECK_SEARCH_FUNC(smb_to_posix_error, smb_err, mapping_table_ERRDOS,
|
||||
mapping_table_ERRDOS_num);
|
||||
/* check_search_mapping_table_ERRSRV */
|
||||
DEFINE_CHECK_SEARCH_FUNC(smb_to_posix_error, smb_err, mapping_table_ERRSRV,
|
||||
mapping_table_ERRSRV_num);
|
||||
|
||||
static struct kunit_case maperror_test_cases[] = {
|
||||
KUNIT_CASE(check_search_ntstatus_to_dos_map),
|
||||
KUNIT_CASE(check_search_mapping_table_ERRDOS),
|
||||
KUNIT_CASE(check_search_mapping_table_ERRSRV),
|
||||
{}
|
||||
};
|
||||
|
||||
static struct kunit_suite maperror_suite = {
|
||||
.name = "smb1_maperror",
|
||||
.test_cases = maperror_test_cases,
|
||||
};
|
||||
|
||||
kunit_test_suite(maperror_suite);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("KUnit tests of SMB1 maperror");
|
||||
@@ -234,8 +234,23 @@ int cifs_verify_signature(struct smb_rqst *rqst,
|
||||
* smb1maperror.c
|
||||
*/
|
||||
int map_smb_to_linux_error(char *buf, bool logErr);
|
||||
int smb1_init_maperror(void);
|
||||
int map_and_check_smb_error(struct TCP_Server_Info *server,
|
||||
struct mid_q_entry *mid, bool logErr);
|
||||
#if IS_ENABLED(CONFIG_SMB1_KUNIT_TESTS)
|
||||
extern const struct ntstatus_to_dos_err *ntstatus_to_dos_map_test;
|
||||
extern unsigned int ntstatus_to_dos_num;
|
||||
const struct ntstatus_to_dos_err *
|
||||
search_ntstatus_to_dos_map_test(__u32 ntstatus);
|
||||
extern const struct smb_to_posix_error *mapping_table_ERRDOS_test;
|
||||
extern unsigned int mapping_table_ERRDOS_num;
|
||||
const struct smb_to_posix_error *
|
||||
search_mapping_table_ERRDOS_test(__u16 smb_err);
|
||||
extern const struct smb_to_posix_error *mapping_table_ERRSRV_test;
|
||||
extern unsigned int mapping_table_ERRSRV_num;
|
||||
const struct smb_to_posix_error *
|
||||
search_mapping_table_ERRSRV_test(__u16 smb_err);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* smb1misc.c
|
||||
|
||||
@@ -27,10 +27,11 @@ static struct smb2_symlink_err_rsp *symlink_data(const struct kvec *iov)
|
||||
{
|
||||
struct smb2_err_rsp *err = iov->iov_base;
|
||||
struct smb2_symlink_err_rsp *sym = ERR_PTR(-EINVAL);
|
||||
u8 *end = (u8 *)err + iov->iov_len;
|
||||
u32 len;
|
||||
|
||||
if (err->ErrorContextCount) {
|
||||
struct smb2_error_context_rsp *p, *end;
|
||||
struct smb2_error_context_rsp *p;
|
||||
|
||||
len = (u32)err->ErrorContextCount * (offsetof(struct smb2_error_context_rsp,
|
||||
ErrorContextData) +
|
||||
@@ -39,8 +40,7 @@ static struct smb2_symlink_err_rsp *symlink_data(const struct kvec *iov)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
p = (struct smb2_error_context_rsp *)err->ErrorData;
|
||||
end = (struct smb2_error_context_rsp *)((u8 *)err + iov->iov_len);
|
||||
do {
|
||||
while ((u8 *)p + sizeof(*p) <= end) {
|
||||
if (le32_to_cpu(p->ErrorId) == SMB2_ERROR_ID_DEFAULT) {
|
||||
sym = (struct smb2_symlink_err_rsp *)p->ErrorContextData;
|
||||
break;
|
||||
@@ -50,14 +50,16 @@ static struct smb2_symlink_err_rsp *symlink_data(const struct kvec *iov)
|
||||
|
||||
len = ALIGN(le32_to_cpu(p->ErrorDataLength), 8);
|
||||
p = (struct smb2_error_context_rsp *)(p->ErrorContextData + len);
|
||||
} while (p < end);
|
||||
}
|
||||
} else if (le32_to_cpu(err->ByteCount) >= sizeof(*sym) &&
|
||||
iov->iov_len >= SMB2_SYMLINK_STRUCT_SIZE) {
|
||||
sym = (struct smb2_symlink_err_rsp *)err->ErrorData;
|
||||
}
|
||||
|
||||
if (!IS_ERR(sym) && (le32_to_cpu(sym->SymLinkErrorTag) != SYMLINK_ERROR_TAG ||
|
||||
le32_to_cpu(sym->ReparseTag) != IO_REPARSE_TAG_SYMLINK))
|
||||
if (!IS_ERR(sym) &&
|
||||
((u8 *)sym + sizeof(*sym) > end ||
|
||||
le32_to_cpu(sym->SymLinkErrorTag) != SYMLINK_ERROR_TAG ||
|
||||
le32_to_cpu(sym->ReparseTag) != IO_REPARSE_TAG_SYMLINK))
|
||||
sym = ERR_PTR(-EINVAL);
|
||||
|
||||
return sym;
|
||||
@@ -128,8 +130,10 @@ int smb2_parse_symlink_response(struct cifs_sb_info *cifs_sb, const struct kvec
|
||||
print_len = le16_to_cpu(sym->PrintNameLength);
|
||||
print_offs = le16_to_cpu(sym->PrintNameOffset);
|
||||
|
||||
if (iov->iov_len < SMB2_SYMLINK_STRUCT_SIZE + sub_offs + sub_len ||
|
||||
iov->iov_len < SMB2_SYMLINK_STRUCT_SIZE + print_offs + print_len)
|
||||
if ((char *)sym->PathBuffer + sub_offs + sub_len >
|
||||
(char *)iov->iov_base + iov->iov_len ||
|
||||
(char *)sym->PathBuffer + print_offs + print_len >
|
||||
(char *)iov->iov_base + iov->iov_len)
|
||||
return -EINVAL;
|
||||
|
||||
return smb2_parse_native_symlink(path,
|
||||
|
||||
@@ -128,7 +128,7 @@ static int check_wsl_eas(struct kvec *rsp_iov)
|
||||
nlen = ea->ea_name_length;
|
||||
vlen = le16_to_cpu(ea->ea_value_length);
|
||||
if (nlen != SMB2_WSL_XATTR_NAME_LEN ||
|
||||
(u8 *)ea + nlen + 1 + vlen > end)
|
||||
(u8 *)ea->ea_data + nlen + 1 + vlen > end)
|
||||
return -EINVAL;
|
||||
|
||||
switch (vlen) {
|
||||
@@ -164,6 +164,27 @@ static int check_wsl_eas(struct kvec *rsp_iov)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* If @cfile is NULL, then need to account for trailing CLOSE request in the
|
||||
* compound chain.
|
||||
*/
|
||||
static void set_next_compound(struct cifs_tcon *tcon,
|
||||
struct cifsFileInfo *cfile,
|
||||
int i, int num_cmds,
|
||||
struct smb_rqst *rqst, int *num_rqst)
|
||||
{
|
||||
int k = !cfile ? 1 : 0;
|
||||
|
||||
if (i + 1 < num_cmds + k)
|
||||
smb2_set_next_command(tcon, &rqst[*num_rqst]);
|
||||
if (i + k > 0)
|
||||
smb2_set_related(&rqst[*num_rqst]);
|
||||
(*num_rqst)++;
|
||||
}
|
||||
|
||||
#define COMP_PID(cfile) ((cfile) ? (cfile)->fid.persistent_fid : COMPOUND_FID)
|
||||
#define COMP_VID(cfile) ((cfile) ? (cfile)->fid.volatile_fid : COMPOUND_FID)
|
||||
|
||||
/*
|
||||
* note: If cfile is passed, the reference to it is dropped here.
|
||||
* So make sure that you do not reuse cfile after return from this func.
|
||||
@@ -284,32 +305,16 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
rqst[num_rqst].rq_iov = &vars->qi_iov;
|
||||
rqst[num_rqst].rq_nvec = 1;
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
FILE_ALL_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
sizeof(struct smb2_file_all_info) +
|
||||
PATH_MAX * 2, 0, NULL);
|
||||
} else {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID,
|
||||
COMPOUND_FID,
|
||||
FILE_ALL_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
sizeof(struct smb2_file_all_info) +
|
||||
PATH_MAX * 2, 0, NULL);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
FILE_ALL_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
sizeof(struct smb2_file_all_info) +
|
||||
PATH_MAX * 2, 0, NULL);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_query_info_compound_enter(xid, tcon->tid,
|
||||
ses->Suid, full_path);
|
||||
break;
|
||||
@@ -317,35 +322,18 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
rqst[num_rqst].rq_iov = &vars->qi_iov;
|
||||
rqst[num_rqst].rq_nvec = 1;
|
||||
|
||||
if (cfile) {
|
||||
/* TBD: fix following to allow for longer SIDs */
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
SMB_FIND_FILE_POSIX_INFO,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
sizeof(struct smb311_posix_qinfo) +
|
||||
(PATH_MAX * 2) +
|
||||
(sizeof(struct smb_sid) * 2), 0, NULL);
|
||||
} else {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID,
|
||||
COMPOUND_FID,
|
||||
SMB_FIND_FILE_POSIX_INFO,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
sizeof(struct smb311_posix_qinfo) +
|
||||
(PATH_MAX * 2) +
|
||||
(sizeof(struct smb_sid) * 2), 0, NULL);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
/* TBD: fix following to allow for longer SIDs */
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
SMB_FIND_FILE_POSIX_INFO,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
sizeof(struct smb311_posix_qinfo) +
|
||||
(PATH_MAX * 2) +
|
||||
(sizeof(struct smb_sid) * 2), 0, NULL);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_posix_query_info_compound_enter(xid, tcon->tid,
|
||||
ses->Suid, full_path);
|
||||
break;
|
||||
@@ -363,32 +351,15 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
size[0] = 1; /* sizeof __u8 See MS-FSCC section 2.4.11 */
|
||||
data[0] = &delete_pending[0];
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
current->tgid,
|
||||
FILE_DISPOSITION_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
data, size);
|
||||
} else {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID,
|
||||
COMPOUND_FID,
|
||||
current->tgid,
|
||||
FILE_DISPOSITION_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
data, size);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
current->tgid, FILE_DISPOSITION_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
data, size);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_unlink_enter(xid, tcon->tid, ses->Suid, full_path);
|
||||
break;
|
||||
case SMB2_OP_SET_EOF:
|
||||
@@ -398,32 +369,15 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
size[0] = in_iov[i].iov_len;
|
||||
data[0] = in_iov[i].iov_base;
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
current->tgid,
|
||||
FILE_END_OF_FILE_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
data, size);
|
||||
} else {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID,
|
||||
COMPOUND_FID,
|
||||
current->tgid,
|
||||
FILE_END_OF_FILE_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
data, size);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
current->tgid, FILE_END_OF_FILE_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
data, size);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_set_eof_enter(xid, tcon->tid, ses->Suid, full_path);
|
||||
break;
|
||||
case SMB2_OP_SET_INFO:
|
||||
@@ -433,28 +387,14 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
size[0] = in_iov[i].iov_len;
|
||||
data[0] = in_iov[i].iov_base;
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid, current->tgid,
|
||||
FILE_BASIC_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
} else {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID,
|
||||
COMPOUND_FID, current->tgid,
|
||||
FILE_BASIC_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
current->tgid, FILE_BASIC_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_set_info_compound_enter(xid, tcon->tid,
|
||||
ses->Suid, full_path);
|
||||
break;
|
||||
@@ -474,31 +414,19 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
size[1] = len + 2 /* null */;
|
||||
data[1] = in_iov[i].iov_base;
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
current->tgid, FILE_RENAME_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
} else {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID, COMPOUND_FID,
|
||||
current->tgid, FILE_RENAME_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
current->tgid, FILE_RENAME_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_rename_enter(xid, tcon->tid, ses->Suid, full_path);
|
||||
break;
|
||||
case SMB2_OP_HARDLINK:
|
||||
rqst[num_rqst].rq_iov = &vars->si_iov[0];
|
||||
rqst[num_rqst].rq_iov = vars->hl_iov;
|
||||
rqst[num_rqst].rq_nvec = 2;
|
||||
|
||||
len = in_iov[i].iov_len;
|
||||
@@ -514,41 +442,27 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
data[1] = in_iov[i].iov_base;
|
||||
|
||||
rc = SMB2_set_info_init(tcon, server,
|
||||
&rqst[num_rqst], COMPOUND_FID,
|
||||
COMPOUND_FID, current->tgid,
|
||||
FILE_LINK_INFORMATION,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
current->tgid, FILE_LINK_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0, data, size);
|
||||
if (rc)
|
||||
goto finished;
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst++]);
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_hardlink_enter(xid, tcon->tid, ses->Suid, full_path);
|
||||
break;
|
||||
case SMB2_OP_SET_REPARSE:
|
||||
rqst[num_rqst].rq_iov = vars->io_iov;
|
||||
rqst[num_rqst].rq_nvec = ARRAY_SIZE(vars->io_iov);
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_ioctl_init(tcon, server, &rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
FSCTL_SET_REPARSE_POINT,
|
||||
in_iov[i].iov_base,
|
||||
in_iov[i].iov_len, 0);
|
||||
} else {
|
||||
rc = SMB2_ioctl_init(tcon, server, &rqst[num_rqst],
|
||||
COMPOUND_FID, COMPOUND_FID,
|
||||
FSCTL_SET_REPARSE_POINT,
|
||||
in_iov[i].iov_base,
|
||||
in_iov[i].iov_len, 0);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_ioctl_init(tcon, server, &rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
FSCTL_SET_REPARSE_POINT,
|
||||
in_iov[i].iov_base,
|
||||
in_iov[i].iov_len, 0);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_set_reparse_compound_enter(xid, tcon->tid,
|
||||
ses->Suid, full_path);
|
||||
break;
|
||||
@@ -556,25 +470,13 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
rqst[num_rqst].rq_iov = vars->io_iov;
|
||||
rqst[num_rqst].rq_nvec = ARRAY_SIZE(vars->io_iov);
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_ioctl_init(tcon, server, &rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
FSCTL_GET_REPARSE_POINT,
|
||||
NULL, 0, CIFSMaxBufSize);
|
||||
} else {
|
||||
rc = SMB2_ioctl_init(tcon, server, &rqst[num_rqst],
|
||||
COMPOUND_FID, COMPOUND_FID,
|
||||
FSCTL_GET_REPARSE_POINT,
|
||||
NULL, 0, CIFSMaxBufSize);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_ioctl_init(tcon, server, &rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
FSCTL_GET_REPARSE_POINT,
|
||||
NULL, 0, CIFSMaxBufSize);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_get_reparse_compound_enter(xid, tcon->tid,
|
||||
ses->Suid, full_path);
|
||||
break;
|
||||
@@ -582,34 +484,17 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
rqst[num_rqst].rq_iov = &vars->ea_iov;
|
||||
rqst[num_rqst].rq_nvec = 1;
|
||||
|
||||
if (cfile) {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
cfile->fid.persistent_fid,
|
||||
cfile->fid.volatile_fid,
|
||||
FILE_FULL_EA_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
SMB2_WSL_MAX_QUERY_EA_RESP_SIZE,
|
||||
sizeof(wsl_query_eas),
|
||||
(void *)wsl_query_eas);
|
||||
} else {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMPOUND_FID,
|
||||
COMPOUND_FID,
|
||||
FILE_FULL_EA_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
SMB2_WSL_MAX_QUERY_EA_RESP_SIZE,
|
||||
sizeof(wsl_query_eas),
|
||||
(void *)wsl_query_eas);
|
||||
}
|
||||
if (!rc && (!cfile || num_rqst > 1)) {
|
||||
smb2_set_next_command(tcon, &rqst[num_rqst]);
|
||||
smb2_set_related(&rqst[num_rqst]);
|
||||
} else if (rc) {
|
||||
rc = SMB2_query_info_init(tcon, server,
|
||||
&rqst[num_rqst],
|
||||
COMP_PID(cfile), COMP_VID(cfile),
|
||||
FILE_FULL_EA_INFORMATION,
|
||||
SMB2_O_INFO_FILE, 0,
|
||||
SMB2_WSL_MAX_QUERY_EA_RESP_SIZE,
|
||||
sizeof(wsl_query_eas),
|
||||
(void *)wsl_query_eas);
|
||||
if (rc)
|
||||
goto finished;
|
||||
}
|
||||
num_rqst++;
|
||||
set_next_compound(tcon, cfile, i, num_cmds, rqst, &num_rqst);
|
||||
trace_smb3_query_wsl_ea_compound_enter(xid, tcon->tid,
|
||||
ses->Suid, full_path);
|
||||
break;
|
||||
@@ -1156,7 +1041,7 @@ smb2_mkdir_setinfo(struct inode *inode, const char *name,
|
||||
cifs_i = CIFS_I(inode);
|
||||
dosattrs = cifs_i->cifsAttrs | ATTR_READONLY;
|
||||
data.Attributes = cpu_to_le32(dosattrs);
|
||||
cifs_get_writable_path(tcon, name, FIND_ANY, &cfile);
|
||||
cifs_get_writable_path(tcon, name, inode, FIND_ANY, &cfile);
|
||||
oparms = CIFS_OPARMS(cifs_sb, tcon, name, FILE_WRITE_ATTRIBUTES,
|
||||
FILE_CREATE, CREATE_NOT_FILE, ACL_NO_MODE);
|
||||
tmprc = smb2_compound_op(xid, tcon, cifs_sb, name,
|
||||
@@ -1332,34 +1217,62 @@ int smb2_rename_path(const unsigned int xid,
|
||||
const char *from_name, const char *to_name,
|
||||
struct cifs_sb_info *cifs_sb)
|
||||
{
|
||||
struct inode *inode = source_dentry ? d_inode(source_dentry) : NULL;
|
||||
struct cifsFileInfo *cfile;
|
||||
__u32 co = file_create_options(source_dentry);
|
||||
|
||||
drop_cached_dir_by_name(xid, tcon, from_name, cifs_sb);
|
||||
cifs_get_writable_path(tcon, from_name, FIND_WITH_DELETE, &cfile);
|
||||
cifs_get_writable_path(tcon, from_name, inode,
|
||||
FIND_WITH_DELETE, &cfile);
|
||||
|
||||
int rc = smb2_set_path_attr(xid, tcon, from_name, to_name, cifs_sb,
|
||||
co, DELETE, SMB2_OP_RENAME, cfile, source_dentry);
|
||||
if (rc == -EINVAL) {
|
||||
cifs_dbg(FYI, "invalid lease key, resending request without lease");
|
||||
cifs_get_writable_path(tcon, from_name, FIND_WITH_DELETE, &cfile);
|
||||
cifs_get_writable_path(tcon, from_name, inode,
|
||||
FIND_WITH_DELETE, &cfile);
|
||||
rc = smb2_set_path_attr(xid, tcon, from_name, to_name, cifs_sb,
|
||||
co, DELETE, SMB2_OP_RENAME, cfile, NULL);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int clear_tmpfile_attr(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
struct inode *inode, const char *full_path)
|
||||
{
|
||||
struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses);
|
||||
struct cifsInodeInfo *cinode = CIFS_I(inode);
|
||||
FILE_BASIC_INFO fi;
|
||||
|
||||
cinode->cifsAttrs &= ~(ATTR_TEMPORARY | ATTR_HIDDEN);
|
||||
fi = (FILE_BASIC_INFO) {
|
||||
.Attributes = cpu_to_le32(cinode->cifsAttrs),
|
||||
};
|
||||
return server->ops->set_file_info(inode, full_path, &fi, xid);
|
||||
}
|
||||
|
||||
int smb2_create_hardlink(const unsigned int xid,
|
||||
struct cifs_tcon *tcon,
|
||||
struct dentry *source_dentry,
|
||||
const char *from_name, const char *to_name,
|
||||
struct cifs_sb_info *cifs_sb)
|
||||
{
|
||||
struct inode *inode = source_dentry ? d_inode(source_dentry) : NULL;
|
||||
__u32 co = file_create_options(source_dentry);
|
||||
struct cifsFileInfo *cfile;
|
||||
int rc;
|
||||
|
||||
if (inode && test_bit(CIFS_INO_TMPFILE, &CIFS_I(inode)->flags)) {
|
||||
rc = clear_tmpfile_attr(xid, tcon, inode, from_name);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
cifs_get_writable_path(tcon, from_name, inode,
|
||||
FIND_WITH_DELETE, &cfile);
|
||||
return smb2_set_path_attr(xid, tcon, from_name, to_name,
|
||||
cifs_sb, co, FILE_READ_ATTRIBUTES,
|
||||
SMB2_OP_HARDLINK, NULL, NULL);
|
||||
SMB2_OP_HARDLINK, cfile, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -1368,15 +1281,16 @@ smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
struct cifs_sb_info *cifs_sb, bool set_alloc,
|
||||
struct dentry *dentry)
|
||||
{
|
||||
struct inode *inode = dentry ? d_inode(dentry) : NULL;
|
||||
__le64 eof = cpu_to_le64(size);
|
||||
struct cifs_open_parms oparms;
|
||||
struct cifsFileInfo *cfile;
|
||||
struct kvec in_iov;
|
||||
__le64 eof = cpu_to_le64(size);
|
||||
int rc;
|
||||
|
||||
in_iov.iov_base = &eof;
|
||||
in_iov.iov_len = sizeof(eof);
|
||||
cifs_get_writable_path(tcon, full_path, FIND_ANY, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path, inode, FIND_ANY, &cfile);
|
||||
|
||||
oparms = CIFS_OPARMS(cifs_sb, tcon, full_path, FILE_WRITE_DATA,
|
||||
FILE_OPEN, 0, ACL_NO_MODE);
|
||||
@@ -1386,7 +1300,8 @@ smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
cfile, NULL, NULL, dentry);
|
||||
if (rc == -EINVAL) {
|
||||
cifs_dbg(FYI, "invalid lease key, resending request without lease");
|
||||
cifs_get_writable_path(tcon, full_path, FIND_ANY, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path,
|
||||
inode, FIND_ANY, &cfile);
|
||||
rc = smb2_compound_op(xid, tcon, cifs_sb,
|
||||
full_path, &oparms, &in_iov,
|
||||
&(int){SMB2_OP_SET_EOF}, 1,
|
||||
@@ -1416,7 +1331,8 @@ smb2_set_file_info(struct inode *inode, const char *full_path,
|
||||
(buf->LastWriteTime == 0) && (buf->ChangeTime == 0)) {
|
||||
if (buf->Attributes == 0)
|
||||
goto out; /* would be a no op, no sense sending this */
|
||||
cifs_get_writable_path(tcon, full_path, FIND_ANY, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path,
|
||||
inode, FIND_ANY, &cfile);
|
||||
}
|
||||
|
||||
oparms = CIFS_OPARMS(cifs_sb, tcon, full_path, FILE_WRITE_ATTRIBUTES,
|
||||
@@ -1475,7 +1391,7 @@ struct inode *smb2_create_reparse_inode(struct cifs_open_info_data *data,
|
||||
|
||||
if (tcon->posix_extensions) {
|
||||
cmds[1] = SMB2_OP_POSIX_QUERY_INFO;
|
||||
cifs_get_writable_path(tcon, full_path, FIND_ANY, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path, NULL, FIND_ANY, &cfile);
|
||||
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, &oparms,
|
||||
in_iov, cmds, 2, cfile, out_iov, out_buftype, NULL);
|
||||
if (!rc) {
|
||||
@@ -1484,7 +1400,7 @@ struct inode *smb2_create_reparse_inode(struct cifs_open_info_data *data,
|
||||
}
|
||||
} else {
|
||||
cmds[1] = SMB2_OP_QUERY_INFO;
|
||||
cifs_get_writable_path(tcon, full_path, FIND_ANY, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path, NULL, FIND_ANY, &cfile);
|
||||
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, &oparms,
|
||||
in_iov, cmds, 2, cfile, out_iov, out_buftype, NULL);
|
||||
if (!rc) {
|
||||
@@ -1566,8 +1482,8 @@ int smb2_rename_pending_delete(const char *full_path,
|
||||
struct dentry *dentry,
|
||||
const unsigned int xid)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(d_inode(dentry)->i_sb);
|
||||
struct cifsInodeInfo *cinode = CIFS_I(d_inode(dentry));
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dentry);
|
||||
__le16 *utf16_path __free(kfree) = NULL;
|
||||
__u32 co = file_create_options(dentry);
|
||||
int cmds[] = {
|
||||
@@ -1579,14 +1495,10 @@ int smb2_rename_pending_delete(const char *full_path,
|
||||
char *to_name __free(kfree) = NULL;
|
||||
__u32 attrs = cinode->cifsAttrs;
|
||||
struct cifs_open_parms oparms;
|
||||
static atomic_t sillycounter;
|
||||
struct cifsFileInfo *cfile;
|
||||
struct tcon_link *tlink;
|
||||
struct cifs_tcon *tcon;
|
||||
struct kvec iov[2];
|
||||
const char *ppath;
|
||||
void *page;
|
||||
size_t len;
|
||||
int rc;
|
||||
|
||||
tlink = cifs_sb_tlink(cifs_sb);
|
||||
@@ -1594,25 +1506,14 @@ int smb2_rename_pending_delete(const char *full_path,
|
||||
return PTR_ERR(tlink);
|
||||
tcon = tlink_tcon(tlink);
|
||||
|
||||
page = alloc_dentry_path();
|
||||
|
||||
ppath = build_path_from_dentry(dentry->d_parent, page);
|
||||
if (IS_ERR(ppath)) {
|
||||
rc = PTR_ERR(ppath);
|
||||
to_name = cifs_silly_fullpath(dentry);
|
||||
if (IS_ERR(to_name)) {
|
||||
rc = PTR_ERR(to_name);
|
||||
to_name = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
len = strlen(ppath) + strlen("/.__smb1234") + 1;
|
||||
to_name = kmalloc(len, GFP_KERNEL);
|
||||
if (!to_name) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
scnprintf(to_name, len, "%s%c.__smb%04X", ppath, CIFS_DIR_SEP(cifs_sb),
|
||||
atomic_inc_return(&sillycounter) & 0xffff);
|
||||
|
||||
utf16_path = utf16_smb2_path(cifs_sb, to_name, len);
|
||||
utf16_path = utf16_smb2_path(cifs_sb, to_name, strlen(to_name));
|
||||
if (!utf16_path) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
@@ -1635,12 +1536,14 @@ int smb2_rename_pending_delete(const char *full_path,
|
||||
iov[1].iov_base = utf16_path;
|
||||
iov[1].iov_len = sizeof(*utf16_path) * UniStrlen((wchar_t *)utf16_path);
|
||||
|
||||
cifs_get_writable_path(tcon, full_path, FIND_WITH_DELETE, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path, d_inode(dentry),
|
||||
FIND_WITH_DELETE, &cfile);
|
||||
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, &oparms, iov,
|
||||
cmds, num_cmds, cfile, NULL, NULL, dentry);
|
||||
if (rc == -EINVAL) {
|
||||
cifs_dbg(FYI, "invalid lease key, resending request without lease\n");
|
||||
cifs_get_writable_path(tcon, full_path, FIND_WITH_DELETE, &cfile);
|
||||
cifs_get_writable_path(tcon, full_path, d_inode(dentry),
|
||||
FIND_WITH_DELETE, &cfile);
|
||||
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, &oparms, iov,
|
||||
cmds, num_cmds, cfile, NULL, NULL, NULL);
|
||||
}
|
||||
@@ -1653,6 +1556,5 @@ int smb2_rename_pending_delete(const char *full_path,
|
||||
}
|
||||
out:
|
||||
cifs_put_tlink(tlink);
|
||||
free_dentry_path(page);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -112,9 +112,6 @@ int __init smb2_init_maperror(void)
|
||||
#define EXPORT_SYMBOL_FOR_SMB_TEST(sym) \
|
||||
EXPORT_SYMBOL_FOR_MODULES(sym, "smb2maperror_test")
|
||||
|
||||
/* Previous prototype for eliminating the build warning. */
|
||||
const struct status_to_posix_error *smb2_get_err_map_test(__u32 smb2_status);
|
||||
|
||||
const struct status_to_posix_error *smb2_get_err_map_test(__u32 smb2_status)
|
||||
{
|
||||
return smb2_get_err_map(smb2_status);
|
||||
|
||||
@@ -9,11 +9,9 @@
|
||||
*/
|
||||
|
||||
#include <kunit/test.h>
|
||||
#include "cifsglob.h"
|
||||
#include "smb2glob.h"
|
||||
|
||||
const struct status_to_posix_error *smb2_get_err_map_test(__u32 smb2_status);
|
||||
extern const struct status_to_posix_error *smb2_error_map_table_test;
|
||||
extern unsigned int smb2_error_map_num;
|
||||
#include "smb2proto.h"
|
||||
|
||||
static void
|
||||
test_cmp_map(struct kunit *test, const struct status_to_posix_error *expect)
|
||||
@@ -21,7 +19,7 @@ test_cmp_map(struct kunit *test, const struct status_to_posix_error *expect)
|
||||
const struct status_to_posix_error *result;
|
||||
|
||||
result = smb2_get_err_map_test(expect->smb2_status);
|
||||
KUNIT_EXPECT_PTR_NE(test, NULL, result);
|
||||
KUNIT_ASSERT_NOT_NULL(test, result);
|
||||
KUNIT_EXPECT_EQ(test, expect->smb2_status, result->smb2_status);
|
||||
KUNIT_EXPECT_EQ(test, expect->posix_error, result->posix_error);
|
||||
KUNIT_EXPECT_STREQ(test, expect->status_string, result->status_string);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <linux/key-type.h>
|
||||
#include "cached_dir.h"
|
||||
|
||||
struct statfs;
|
||||
struct smb_rqst;
|
||||
|
||||
/*
|
||||
@@ -24,6 +23,12 @@ struct smb_rqst;
|
||||
*/
|
||||
int map_smb2_to_linux_error(char *buf, bool log_err);
|
||||
int smb2_init_maperror(void);
|
||||
#if IS_ENABLED(CONFIG_SMB_KUNIT_TESTS)
|
||||
const struct status_to_posix_error *smb2_get_err_map_test(__u32 smb2_status);
|
||||
extern const struct status_to_posix_error *smb2_error_map_table_test;
|
||||
extern unsigned int smb2_error_map_num;
|
||||
#endif
|
||||
|
||||
int smb2_check_message(char *buf, unsigned int pdu_len, unsigned int len,
|
||||
struct TCP_Server_Info *server);
|
||||
unsigned int smb2_calc_size(void *buf);
|
||||
|
||||
@@ -9,163 +9,290 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define SUCCESS 0x00 /* The request was successful. */
|
||||
#define ERRDOS 0x01 /* Error is from the core DOS operating system set */
|
||||
#define ERRSRV 0x02 /* Error is generated by the file server daemon */
|
||||
#define ERRHRD 0x03 /* Error is a hardware error. */
|
||||
#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
|
||||
struct smb_to_posix_error {
|
||||
__u16 smb_err;
|
||||
int posix_code;
|
||||
};
|
||||
|
||||
/* The request was successful. */
|
||||
#define SUCCESS 0x00
|
||||
/* Error is from the core DOS operating system set */
|
||||
#define ERRDOS 0x01
|
||||
/* Error is generated by the file server daemon */
|
||||
#define ERRSRV 0x02
|
||||
/* Error is a hardware error. */
|
||||
#define ERRHRD 0x03
|
||||
/* Command was not in the "SMB" format. */
|
||||
#define ERRCMD 0xFF
|
||||
|
||||
/* The following error codes may be generated with the SUCCESS error class.*/
|
||||
|
||||
/*#define SUCCESS 0 The request was successful. */
|
||||
|
||||
/* The following error codes may be generated with the ERRDOS error class.*/
|
||||
/*
|
||||
* The following error codes may be generated with the ERRDOS error class.
|
||||
* The comment at the end of each definition indicates the POSIX error
|
||||
* code; it is used to generate the `mapping_table_ERRDOS` array.
|
||||
*/
|
||||
|
||||
#define ERRbadfunc 1 /* Invalid function. The server did not
|
||||
recognize or could not perform a
|
||||
system call generated by the server,
|
||||
e.g., set the DIRECTORY attribute on
|
||||
a data file, invalid seek mode. */
|
||||
#define ERRbadfile 2 /* File not found. The last component
|
||||
of a file's pathname could not be
|
||||
found. */
|
||||
#define ERRbadpath 3 /* Directory invalid. A directory
|
||||
component in a pathname could not be
|
||||
found. */
|
||||
#define ERRnofids 4 /* Too many open files. The server has
|
||||
no file handles available. */
|
||||
#define ERRnoaccess 5 /* Access denied, the client's context
|
||||
does not permit the requested
|
||||
function. This includes the
|
||||
following conditions: invalid rename
|
||||
command, write to Fid open for read
|
||||
only, read on Fid open for write
|
||||
only, attempt to delete a non-empty
|
||||
directory */
|
||||
#define ERRbadfid 6 /* Invalid file handle. The file handle
|
||||
specified was not recognized by the
|
||||
server. */
|
||||
#define ERRbadmcb 7 /* Memory control blocks destroyed. */
|
||||
#define ERRnomem 8 /* Insufficient server memory to
|
||||
perform the requested function. */
|
||||
#define ERRbadmem 9 /* Invalid memory block address. */
|
||||
#define ERRbadenv 10 /* Invalid environment. */
|
||||
#define ERRbadformat 11 /* Invalid format. */
|
||||
#define ERRbadaccess 12 /* Invalid open mode. */
|
||||
#define ERRbaddata 13 /* Invalid data (generated only by
|
||||
IOCTL calls within the server). */
|
||||
#define ERRbaddrive 15 /* Invalid drive specified. */
|
||||
#define ERRremcd 16 /* A Delete Directory request attempted
|
||||
to remove the server's current
|
||||
directory. */
|
||||
#define ERRdiffdevice 17 /* Not same device (e.g., a cross
|
||||
volume rename was attempted */
|
||||
#define ERRnofiles 18 /* A File Search command can find no
|
||||
more files matching the specified
|
||||
criteria. */
|
||||
#define ERRwriteprot 19 /* media is write protected */
|
||||
/*
|
||||
* Invalid function. The server did not
|
||||
* recognize or could not perform a
|
||||
* system call generated by the server,
|
||||
* e.g., set the DIRECTORY attribute on
|
||||
* a data file, invalid seek mode.
|
||||
*/
|
||||
#define ERRbadfunc 1 // -EINVAL
|
||||
/*
|
||||
* File not found. The last component
|
||||
* of a file's pathname could not be
|
||||
* found.
|
||||
*/
|
||||
#define ERRbadfile 2 // -ENOENT
|
||||
/*
|
||||
* Directory invalid. A directory
|
||||
* component in a pathname could not be
|
||||
* found.
|
||||
*/
|
||||
#define ERRbadpath 3 // -ENOTDIR
|
||||
/*
|
||||
* Too many open files. The server has
|
||||
* no file handles available.
|
||||
*/
|
||||
#define ERRnofids 4 // -EMFILE
|
||||
/*
|
||||
* Access denied, the client's context
|
||||
* does not permit the requested
|
||||
* function. This includes the
|
||||
* following conditions: invalid rename
|
||||
* command, write to Fid open for read
|
||||
* only, read on Fid open for write
|
||||
* only, attempt to delete a non-empty
|
||||
* directory
|
||||
*/
|
||||
#define ERRnoaccess 5 // -EACCES
|
||||
/*
|
||||
* Invalid file handle. The file handle
|
||||
* specified was not recognized by the
|
||||
* server.
|
||||
*/
|
||||
#define ERRbadfid 6 // -EBADF
|
||||
/* Memory control blocks destroyed. */
|
||||
#define ERRbadmcb 7 // -EIO
|
||||
/*
|
||||
* Insufficient server memory to
|
||||
* perform the requested function.
|
||||
*/
|
||||
#define ERRnomem 8 // -EREMOTEIO
|
||||
/* Invalid memory block address. */
|
||||
#define ERRbadmem 9 // -EFAULT
|
||||
/* Invalid environment. */
|
||||
#define ERRbadenv 10 // -EFAULT
|
||||
/* Invalid format. */
|
||||
#define ERRbadformat 11 // -EINVAL
|
||||
/* Invalid open mode. */
|
||||
#define ERRbadaccess 12 // -EACCES
|
||||
/*
|
||||
* Invalid data (generated only by
|
||||
* IOCTL calls within the server).
|
||||
*/
|
||||
#define ERRbaddata 13 // -EIO
|
||||
/* Invalid drive specified. */
|
||||
#define ERRbaddrive 15 // -ENXIO
|
||||
/*
|
||||
* A Delete Directory request attempted
|
||||
* to remove the server's current
|
||||
* directory.
|
||||
*/
|
||||
#define ERRremcd 16 // -EACCES
|
||||
/*
|
||||
* Not same device (e.g., a cross
|
||||
* volume rename was attempted
|
||||
*/
|
||||
#define ERRdiffdevice 17 // -EXDEV
|
||||
/*
|
||||
* A File Search command can find no
|
||||
* more files matching the specified
|
||||
* criteria.
|
||||
*/
|
||||
#define ERRnofiles 18 // -ENOENT
|
||||
/* media is write protected */
|
||||
#define ERRwriteprot 19 // -EROFS
|
||||
#define ERRgeneral 31
|
||||
#define ERRbadshare 32 /* The sharing mode specified for an
|
||||
Open conflicts with existing FIDs on
|
||||
the file. */
|
||||
#define ERRlock 33 /* A Lock request conflicted with an
|
||||
existing lock or specified an
|
||||
invalid mode, or an Unlock requested
|
||||
attempted to remove a lock held by
|
||||
another process. */
|
||||
#define ERRunsup 50
|
||||
#define ERRnosuchshare 67
|
||||
#define ERRfilexists 80 /* The file named in the request
|
||||
already exists. */
|
||||
#define ERRinvparm 87
|
||||
#define ERRdiskfull 112
|
||||
#define ERRinvname 123
|
||||
#define ERRunknownlevel 124
|
||||
#define ERRdirnotempty 145
|
||||
#define ERRnotlocked 158
|
||||
#define ERRcancelviolation 173
|
||||
#define ERRalreadyexists 183
|
||||
/*
|
||||
* The sharing mode specified for an
|
||||
* Open conflicts with existing FIDs on
|
||||
* the file.
|
||||
*/
|
||||
#define ERRbadshare 32 // -EBUSY
|
||||
/*
|
||||
* A Lock request conflicted with an
|
||||
* existing lock or specified an
|
||||
* invalid mode, or an Unlock requested
|
||||
* attempted to remove a lock held by
|
||||
* another process.
|
||||
*/
|
||||
#define ERRlock 33 // -EACCES
|
||||
#define ERRunsup 50 // -EINVAL
|
||||
#define ERRnosuchshare 67 // -ENXIO
|
||||
/*
|
||||
* The file named in the request
|
||||
* already exists.
|
||||
*/
|
||||
#define ERRfilexists 80 // -EEXIST
|
||||
#define ERRinvparm 87 // -EINVAL
|
||||
#define ERRdiskfull 112 // -ENOSPC
|
||||
#define ERRinvname 123 // -ENOENT
|
||||
#define ERRunknownlevel 124 // -EOPNOTSUPP
|
||||
#define ERRdirnotempty 145 // -ENOTEMPTY
|
||||
#define ERRnotlocked 158 // -ENOLCK
|
||||
#define ERRcancelviolation 173 // -ENOLCK
|
||||
#define ERRalreadyexists 183 // -EEXIST
|
||||
#define ERRbadpipe 230
|
||||
#define ERRpipebusy 231
|
||||
#define ERRpipeclosing 232
|
||||
#define ERRnotconnected 233
|
||||
#define ERRmoredata 234
|
||||
#define ERReasnotsupported 282
|
||||
#define ErrQuota 0x200 /* The operation would cause a quota
|
||||
limit to be exceeded. */
|
||||
#define ErrNotALink 0x201 /* A link operation was performed on a
|
||||
pathname that was not a link. */
|
||||
#define ERRmoredata 234 // -EOVERFLOW
|
||||
#define ERReasnotsupported 282 // -EOPNOTSUPP
|
||||
/*
|
||||
* The operation would cause a quota
|
||||
* limit to be exceeded.
|
||||
*/
|
||||
#define ErrQuota 0x200 // -EDQUOT
|
||||
/*
|
||||
* A link operation was performed on a
|
||||
* pathname that was not a link.
|
||||
*/
|
||||
#define ErrNotALink 0x201 // -ENOLINK
|
||||
#define ERRnetlogonNotStarted 2455 // -ENOPROTOOPT
|
||||
|
||||
/* Below errors are used internally (do not come over the wire) for passthrough
|
||||
from STATUS codes to POSIX only */
|
||||
#define ERRsymlink 0xFFFD
|
||||
#define ErrTooManyLinks 0xFFFE
|
||||
#define ERRsymlink 0xFFFD // -EOPNOTSUPP
|
||||
#define ErrTooManyLinks 0xFFFE // -EMLINK
|
||||
|
||||
/* Following error codes may be generated with the ERRSRV error class.*/
|
||||
/*
|
||||
* The following error codes may be generated with the ERRSRV error class.
|
||||
* The comment at the end of each definition indicates the POSIX error
|
||||
* code; it is used to generate the `mapping_table_ERRSRV` array.
|
||||
*/
|
||||
|
||||
#define ERRerror 1 /* Non-specific error code. It is
|
||||
returned under the following
|
||||
conditions: resource other than disk
|
||||
space exhausted (e.g. TIDs), first
|
||||
SMB command was not negotiate,
|
||||
multiple negotiates attempted, and
|
||||
internal server error. */
|
||||
#define ERRbadpw 2 /* Bad password - name/password pair in
|
||||
a TreeConnect or Session Setup are
|
||||
invalid. */
|
||||
#define ERRbadtype 3 /* used for indicating DFS referral
|
||||
needed */
|
||||
#define ERRaccess 4 /* The client does not have the
|
||||
necessary access rights within the
|
||||
specified context for requested
|
||||
function. */
|
||||
#define ERRinvtid 5 /* The Tid specified in a command was
|
||||
invalid. */
|
||||
#define ERRinvnetname 6 /* Invalid network name in tree
|
||||
connect. */
|
||||
#define ERRinvdevice 7 /* Invalid device - printer request
|
||||
made to non-printer connection or
|
||||
non-printer request made to printer
|
||||
connection. */
|
||||
#define ERRqfull 49 /* Print queue full (files) -- returned
|
||||
by open print file. */
|
||||
#define ERRqtoobig 50 /* Print queue full -- no space. */
|
||||
#define ERRqeof 51 /* EOF on print queue dump */
|
||||
#define ERRinvpfid 52 /* Invalid print file FID. */
|
||||
#define ERRsmbcmd 64 /* The server did not recognize the
|
||||
command received. */
|
||||
#define ERRsrverror 65 /* The server encountered an internal
|
||||
error, e.g., system file
|
||||
unavailable. */
|
||||
#define ERRbadBID 66 /* (obsolete) */
|
||||
#define ERRfilespecs 67 /* The Fid and pathname parameters
|
||||
contained an invalid combination of
|
||||
values. */
|
||||
#define ERRbadLink 68 /* (obsolete) */
|
||||
#define ERRbadpermits 69 /* The access permissions specified for
|
||||
a file or directory are not a valid
|
||||
combination. */
|
||||
#define ERRbadPID 70
|
||||
#define ERRsetattrmode 71 /* attribute (mode) is invalid */
|
||||
#define ERRpaused 81 /* Server is paused */
|
||||
#define ERRmsgoff 82 /* reserved - messaging off */
|
||||
#define ERRnoroom 83 /* reserved - no room for message */
|
||||
#define ERRrmuns 87 /* reserved - too many remote names */
|
||||
#define ERRtimeout 88 /* operation timed out */
|
||||
#define ERRnoresource 89 /* No resources available for request
|
||||
*/
|
||||
#define ERRtoomanyuids 90 /* Too many UIDs active on this session
|
||||
*/
|
||||
#define ERRbaduid 91 /* The UID is not known as a valid user
|
||||
*/
|
||||
#define ERRusempx 250 /* temporarily unable to use raw */
|
||||
#define ERRusestd 251 /* temporarily unable to use either raw
|
||||
or mpx */
|
||||
#define ERR_NOTIFY_ENUM_DIR 1024
|
||||
#define ERRnoSuchUser 2238 /* user account does not exist */
|
||||
#define ERRaccountexpired 2239
|
||||
#define ERRbadclient 2240 /* can not logon from this client */
|
||||
#define ERRbadLogonTime 2241 /* logon hours do not allow this */
|
||||
#define ERRpasswordExpired 2242
|
||||
#define ERRnetlogonNotStarted 2455
|
||||
#define ERRnosupport 0xFFFF
|
||||
/*
|
||||
* Non-specific error code. It is
|
||||
* returned under the following
|
||||
* conditions: resource other than disk
|
||||
* space exhausted (e.g. TIDs), first
|
||||
* SMB command was not negotiate,
|
||||
* multiple negotiates attempted, and
|
||||
* internal server error.
|
||||
*/
|
||||
#define ERRerror 1 // -EIO
|
||||
/*
|
||||
* Bad password - name/password pair in
|
||||
* a TreeConnect or Session Setup are
|
||||
* invalid.
|
||||
*/
|
||||
#define ERRbadpw 2 // -EACCES
|
||||
/*
|
||||
* used for indicating DFS referral
|
||||
* needed
|
||||
*/
|
||||
#define ERRbadtype 3 // -EREMOTE
|
||||
/*
|
||||
* The client does not have the
|
||||
* necessary access rights within the
|
||||
* specified context for requested
|
||||
* function.
|
||||
*/
|
||||
#define ERRaccess 4 // -EACCES
|
||||
/*
|
||||
* The Tid specified in a command was
|
||||
* invalid.
|
||||
*/
|
||||
#define ERRinvtid 5 // -ENXIO
|
||||
/*
|
||||
* Invalid network name in tree
|
||||
* connect.
|
||||
*/
|
||||
#define ERRinvnetname 6 // -ENXIO
|
||||
/*
|
||||
* Invalid device - printer request
|
||||
* made to non-printer connection or
|
||||
* non-printer request made to printer
|
||||
* connection.
|
||||
*/
|
||||
#define ERRinvdevice 7 // -ENXIO
|
||||
/*
|
||||
* Print queue full (files) -- returned
|
||||
* by open print file.
|
||||
*/
|
||||
#define ERRqfull 49 // -ENOSPC
|
||||
/* Print queue full -- no space. */
|
||||
#define ERRqtoobig 50 // -ENOSPC
|
||||
/* EOF on print queue dump */
|
||||
#define ERRqeof 51 // -EIO
|
||||
/* Invalid print file FID. */
|
||||
#define ERRinvpfid 52 // -EBADF
|
||||
/*
|
||||
* The server did not recognize the
|
||||
* command received.
|
||||
*/
|
||||
#define ERRsmbcmd 64 // -EBADRQC
|
||||
/*
|
||||
* The server encountered an internal
|
||||
* error, e.g., system file
|
||||
* unavailable.
|
||||
*/
|
||||
#define ERRsrverror 65 // -EIO
|
||||
/* (obsolete) */
|
||||
#define ERRbadBID 66 // -EIO
|
||||
/*
|
||||
* The Fid and pathname parameters
|
||||
* contained an invalid combination of
|
||||
* values.
|
||||
*/
|
||||
#define ERRfilespecs 67 // -EINVAL
|
||||
/* (obsolete) */
|
||||
#define ERRbadLink 68 // -EIO
|
||||
/*
|
||||
* The access permissions specified for
|
||||
* a file or directory are not a valid
|
||||
* combination.
|
||||
*/
|
||||
#define ERRbadpermits 69 // -EINVAL
|
||||
#define ERRbadPID 70 // -ESRCH
|
||||
/* attribute (mode) is invalid */
|
||||
#define ERRsetattrmode 71 // -EINVAL
|
||||
/* Server is paused */
|
||||
#define ERRpaused 81 // -EHOSTDOWN
|
||||
/* reserved - messaging off */
|
||||
#define ERRmsgoff 82 // -EHOSTDOWN
|
||||
/* reserved - no room for message */
|
||||
#define ERRnoroom 83 // -ENOSPC
|
||||
/* reserved - too many remote names */
|
||||
#define ERRrmuns 87 // -EUSERS
|
||||
/* operation timed out */
|
||||
#define ERRtimeout 88 // -ETIME
|
||||
/* No resources available for request */
|
||||
#define ERRnoresource 89 // -EREMOTEIO
|
||||
/* Too many UIDs active on this session */
|
||||
#define ERRtoomanyuids 90 // -EUSERS
|
||||
/* The UID is not known as a valid user */
|
||||
#define ERRbaduid 91 // -EACCES
|
||||
/* temporarily unable to use raw */
|
||||
#define ERRusempx 250 // -EIO
|
||||
/*
|
||||
* temporarily unable to use either raw
|
||||
* or mpx
|
||||
*/
|
||||
#define ERRusestd 251 // -EIO
|
||||
#define ERR_NOTIFY_ENUM_DIR 1024 // -ENOBUFS
|
||||
/* user account does not exist */
|
||||
#define ERRnoSuchUser 2238 // -EACCES
|
||||
#define ERRaccountexpired 2239 // -EKEYEXPIRED
|
||||
/* can not logon from this client */
|
||||
#define ERRbadclient 2240 // -EACCES
|
||||
/* logon hours do not allow this */
|
||||
#define ERRbadLogonTime 2241 // -EACCES
|
||||
#define ERRpasswordExpired 2242 // -EKEYEXPIRED
|
||||
#define ERRnosupport 0xFFFF // -EINVAL
|
||||
|
||||
@@ -264,6 +264,7 @@ extern void d_invalidate(struct dentry *);
|
||||
extern struct dentry * d_make_root(struct inode *);
|
||||
|
||||
extern void d_mark_tmpfile(struct file *, struct inode *);
|
||||
void d_mark_tmpfile_name(struct file *file, const struct qstr *name);
|
||||
extern void d_tmpfile(struct file *, struct inode *);
|
||||
|
||||
extern struct dentry *d_find_alias(struct inode *);
|
||||
|
||||
Reference in New Issue
Block a user