⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vfs_unixuid.c

📁 samba最新软件
💻 C
📖 第 1 页 / 共 2 页
字号:
			     struct ntvfs_request *req, union smb_open *io){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, open, (ntvfs, req, io));	return status;}/*  create a directory*/static NTSTATUS unixuid_mkdir(struct ntvfs_module_context *ntvfs,			     struct ntvfs_request *req, union smb_mkdir *md){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, mkdir, (ntvfs, req, md));	return status;}/*  remove a directory*/static NTSTATUS unixuid_rmdir(struct ntvfs_module_context *ntvfs,			     struct ntvfs_request *req, struct smb_rmdir *rd){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, rmdir, (ntvfs, req, rd));	return status;}/*  rename a set of files*/static NTSTATUS unixuid_rename(struct ntvfs_module_context *ntvfs,			      struct ntvfs_request *req, union smb_rename *ren){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, rename, (ntvfs, req, ren));	return status;}/*  copy a set of files*/static NTSTATUS unixuid_copy(struct ntvfs_module_context *ntvfs,			    struct ntvfs_request *req, struct smb_copy *cp){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, copy, (ntvfs, req, cp));	return status;}/*  read from a file*/static NTSTATUS unixuid_read(struct ntvfs_module_context *ntvfs,			    struct ntvfs_request *req, union smb_read *rd){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, read, (ntvfs, req, rd));	return status;}/*  write to a file*/static NTSTATUS unixuid_write(struct ntvfs_module_context *ntvfs,			     struct ntvfs_request *req, union smb_write *wr){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, write, (ntvfs, req, wr));	return status;}/*  seek in a file*/static NTSTATUS unixuid_seek(struct ntvfs_module_context *ntvfs,			     struct ntvfs_request *req,			     union smb_seek *io){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, seek, (ntvfs, req, io));	return status;}/*  flush a file*/static NTSTATUS unixuid_flush(struct ntvfs_module_context *ntvfs,			      struct ntvfs_request *req,			      union smb_flush *io){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, flush, (ntvfs, req, io));	return status;}/*  close a file*/static NTSTATUS unixuid_close(struct ntvfs_module_context *ntvfs,			     struct ntvfs_request *req, union smb_close *io){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, close, (ntvfs, req, io));	return status;}/*  exit - closing files*/static NTSTATUS unixuid_exit(struct ntvfs_module_context *ntvfs,			    struct ntvfs_request *req){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, exit, (ntvfs, req));	return status;}/*  logoff - closing files*/static NTSTATUS unixuid_logoff(struct ntvfs_module_context *ntvfs,			      struct ntvfs_request *req){	struct unixuid_private *private = ntvfs->private_data;	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, logoff, (ntvfs, req));	private->last_token = NULL;	return status;}/*  async setup*/static NTSTATUS unixuid_async_setup(struct ntvfs_module_context *ntvfs,				    struct ntvfs_request *req, 				    void *private){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, async_setup, (ntvfs, req, private));	return status;}/*  cancel an async request*/static NTSTATUS unixuid_cancel(struct ntvfs_module_context *ntvfs,			       struct ntvfs_request *req){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, cancel, (ntvfs, req));	return status;}/*  change notify*/static NTSTATUS unixuid_notify(struct ntvfs_module_context *ntvfs,			       struct ntvfs_request *req, union smb_notify *info){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, notify, (ntvfs, req, info));	return status;}/*  lock a byte range*/static NTSTATUS unixuid_lock(struct ntvfs_module_context *ntvfs,			    struct ntvfs_request *req, union smb_lock *lck){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, lock, (ntvfs, req, lck));	return status;}/*  set info on a open file*/static NTSTATUS unixuid_setfileinfo(struct ntvfs_module_context *ntvfs,				   struct ntvfs_request *req, 				   union smb_setfileinfo *info){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, setfileinfo, (ntvfs, req, info));	return status;}/*  return filesystem space info*/static NTSTATUS unixuid_fsinfo(struct ntvfs_module_context *ntvfs,			      struct ntvfs_request *req, union smb_fsinfo *fs){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, fsinfo, (ntvfs, req, fs));	return status;}/*  return print queue info*/static NTSTATUS unixuid_lpq(struct ntvfs_module_context *ntvfs,			   struct ntvfs_request *req, union smb_lpq *lpq){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, lpq, (ntvfs, req, lpq));	return status;}/*    list files in a directory matching a wildcard pattern*/static NTSTATUS unixuid_search_first(struct ntvfs_module_context *ntvfs,				    struct ntvfs_request *req, union smb_search_first *io, 				    void *search_private, 				    bool (*callback)(void *, const union smb_search_data *)){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, search_first, (ntvfs, req, io, search_private, callback));	return status;}/* continue a search */static NTSTATUS unixuid_search_next(struct ntvfs_module_context *ntvfs,				   struct ntvfs_request *req, union smb_search_next *io, 				   void *search_private, 				   bool (*callback)(void *, const union smb_search_data *)){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, search_next, (ntvfs, req, io, search_private, callback));	return status;}/* close a search */static NTSTATUS unixuid_search_close(struct ntvfs_module_context *ntvfs,				    struct ntvfs_request *req, union smb_search_close *io){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, search_close, (ntvfs, req, io));	return status;}/* SMBtrans - not used on file shares */static NTSTATUS unixuid_trans(struct ntvfs_module_context *ntvfs,			     struct ntvfs_request *req, struct smb_trans2 *trans2){	NTSTATUS status;	PASS_THRU_REQ(ntvfs, req, trans, (ntvfs, req, trans2));	return status;}/*  initialise the unixuid backend, registering ourselves with the ntvfs subsystem */NTSTATUS ntvfs_unixuid_init(void){	NTSTATUS ret;	struct ntvfs_ops ops;	NTVFS_CURRENT_CRITICAL_SIZES(vers);	ZERO_STRUCT(ops);	/* fill in all the operations */	ops.connect = unixuid_connect;	ops.disconnect = unixuid_disconnect;	ops.unlink = unixuid_unlink;	ops.chkpath = unixuid_chkpath;	ops.qpathinfo = unixuid_qpathinfo;	ops.setpathinfo = unixuid_setpathinfo;	ops.open = unixuid_open;	ops.mkdir = unixuid_mkdir;	ops.rmdir = unixuid_rmdir;	ops.rename = unixuid_rename;	ops.copy = unixuid_copy;	ops.ioctl = unixuid_ioctl;	ops.read = unixuid_read;	ops.write = unixuid_write;	ops.seek = unixuid_seek;	ops.flush = unixuid_flush;		ops.close = unixuid_close;	ops.exit = unixuid_exit;	ops.lock = unixuid_lock;	ops.setfileinfo = unixuid_setfileinfo;	ops.qfileinfo = unixuid_qfileinfo;	ops.fsinfo = unixuid_fsinfo;	ops.lpq = unixuid_lpq;	ops.search_first = unixuid_search_first;	ops.search_next = unixuid_search_next;	ops.search_close = unixuid_search_close;	ops.trans = unixuid_trans;	ops.logoff = unixuid_logoff;	ops.async_setup = unixuid_async_setup;	ops.cancel = unixuid_cancel;	ops.notify = unixuid_notify;	ops.name = "unixuid";	/* we register under all 3 backend types, as we are not type specific */	ops.type = NTVFS_DISK;		ret = ntvfs_register(&ops, &vers);	if (!NT_STATUS_IS_OK(ret)) goto failed;	ops.type = NTVFS_PRINT;		ret = ntvfs_register(&ops, &vers);	if (!NT_STATUS_IS_OK(ret)) goto failed;	ops.type = NTVFS_IPC;		ret = ntvfs_register(&ops, &vers);	if (!NT_STATUS_IS_OK(ret)) goto failed;	failed:	return ret;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -