From 52f6a4436f9da439fc687894b329898833af7ff8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 23 Jan 2009 10:08:44 +0100 Subject: s3:smbd: make kernel oplocks event driven And use signal events for Linux oplocks. metze --- source3/include/smb.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index aa2db693a3..3f71cde395 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1680,12 +1680,10 @@ struct kernel_oplocks { /* if a kernel does support oplocks then a structure of the following typee is used to describe how to interact with the kernel */ struct kernel_oplocks_ops { - files_struct * (*receive_message)(struct kernel_oplocks *ctx); bool (*set_oplock)(struct kernel_oplocks *ctx, files_struct *fsp, int oplock_type); void (*release_oplock)(struct kernel_oplocks *ctx, files_struct *fsp); - bool (*msg_waiting)(struct kernel_oplocks *ctx); }; #include "smb_macros.h" -- cgit From 22e3004829fe742efdbf750611749b9aaf585515 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 29 Jan 2009 22:54:55 +0100 Subject: Add the "SMBD" rpc transport The idea of this is that all client utils like smbpasswd and also for example "net join" do not access our internal databases like passdb and secrets.tdb directly anymore but pass everything throught the well-established RPC interfaces. The way you use this is the following: With rpc_cli_smbd_conn_init() or its async variant you initialize a "struct rpc_cli_smbd_conn". This structure is the link to a freshly forked smbd, ready to be used for RPC services. You should only ever have one such structure in your program. More don't hurt, but are plainly unnecessary. If you want to use the SAMR pipe to change a passwort, you connect to that pipe with rpc_pipe_open_local. Do you normal rpccli_samr calls on that and your locally forked smbd will connect to passdb for you. GD, this might make the distinction between the _l and _r calls in libnetapi mostly unnecessary. At least it is intended to do so... :-) --- source3/include/smb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index 3f71cde395..9451710255 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -367,6 +367,7 @@ struct uuid; struct named_mutex; struct pcap_cache; struct wb_context; +struct rpc_cli_smbd_conn; struct vfs_fsp_data { struct vfs_fsp_data *next; -- cgit From d94e9c802ceddeff93168337b6fc5533db7f2d33 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 30 Jan 2009 23:44:21 +0100 Subject: Remove the global variable "chain_size" --- source3/include/smb.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index 9451710255..be6ccbf597 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1549,11 +1549,6 @@ enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K}; */ #define COPYBUF_SIZE (8*1024) -/* - * Used in chaining code. - */ -extern int chain_size; - /* * Map the Core and Extended Oplock requesst bits down * to common bits (EXCLUSIVE_OPLOCK & BATCH_OPLOCK). -- cgit From c2fe28ba598e7db2915b3bb5e7b8d281361a4c95 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 14 Oct 2008 15:53:35 +0200 Subject: Convert api_rpc_trans_reply to async np_* --- source3/include/smb.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index be6ccbf597..491dd763ff 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -624,7 +624,18 @@ struct smb_request { uint16_t buflen; const uint8_t *buf; const uint8 *inbuf; + + /* + * Async handling in the main smb processing loop is directed by + * outbuf: reply_xxx routines indicate sync behaviour by putting their + * reply into "outbuf". If they leave it as NULL, they take of it + * themselves, possibly later. + * + * If async handling is wanted, the reply_xxx routine must make sure + * that it talloc_move()s the smb_req somewhere else. + */ uint8 *outbuf; + size_t unread_bytes; bool encrypted; connection_struct *conn; @@ -638,6 +649,11 @@ struct smb_request { * Here we collect the outbufs from the chain handlers */ uint8_t *chain_outbuf; + + /* + * state information for async smb handling + */ + void *async_priv; }; /* Defines for the sent_oplock_break field above. */ -- cgit From 553818add80818909268557665e2760a16f2d8a0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 2 Feb 2009 17:10:27 -0800 Subject: Fix bug #6082 - smbd_gpfs_getacl failed: Windows client canĀ“t rename or delete file This fixes the generic rename/delete problem for 3.3.0 and above. Fixed slightly differently to discussions, user viewable modified ACLs are not a good idea :-). Jeremy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source3/include/smb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index 491dd763ff..b441b3476a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1259,7 +1259,7 @@ struct bitmap { /* Mapping of access rights to UNIX perms. for a UNIX directory. */ #define UNIX_DIRECTORY_ACCESS_RWX FILE_GENERIC_ALL #define UNIX_DIRECTORY_ACCESS_R FILE_GENERIC_READ -#define UNIX_DIRECTORY_ACCESS_W FILE_GENERIC_WRITE +#define UNIX_DIRECTORY_ACCESS_W (FILE_GENERIC_WRITE|FILE_DELETE_CHILD) #define UNIX_DIRECTORY_ACCESS_X FILE_GENERIC_EXECUTE #if 0 -- cgit