[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8a338c6 s3:smbd: change set_file_oplock() to return NTSTATUS via 088ca00 s3: Replace an if with a boolean short circuit via a3b4a5d s3: Assigning ?True:False to a bool is a bit pointless via 4aea0c1 s3: Remove unnecessary () via a512780 s3: Replace an if with a boolean short circuit via 91be6b4 s3: Assigning ?True:False to a bool is a bit pointless via e1e1fbc s3: Remove unnecessary () from b725154 tevent: change version to 0.9.16 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8a338c65a1824ae8a93bef7bc8fac65684c285c8 Author: Michael Adam Date: Fri Jun 8 17:47:31 2012 +0200 s3:smbd: change set_file_oplock() to return NTSTATUS Pair-Programmed-With: Volker Lendecke Pair-Programmed-With: Stefan Metzmacher Autobuild-User(master): Michael Adam Autobuild-Date(master): Fri Jun 8 23:20:20 CEST 2012 on sn-devel-104 commit 088ca00b926894575e75a03756642b9726f421d7 Author: Volker Lendecke Date: Fri Jun 8 14:26:52 2012 +0200 s3: Replace an if with a boolean short circuit Signed-off-by: Michael Adam commit a3b4a5d7793b208436e541f2382c96c35fa31089 Author: Volker Lendecke Date: Fri Jun 8 14:29:41 2012 +0200 s3: Assigning ?True:False to a bool is a bit pointless Signed-off-by: Michael Adam commit 4aea0c1fa1dab5f9480a9e5e1ea5e4af18ac061e Author: Volker Lendecke Date: Fri Jun 8 14:24:41 2012 +0200 s3: Remove unnecessary () Signed-off-by: Michael Adam commit a51278067b47a7c2afe9ca0f32bc8fd340ce6a57 Author: Volker Lendecke Date: Fri Jun 8 14:26:52 2012 +0200 s3: Replace an if with a boolean short circuit Signed-off-by: Michael Adam commit 91be6b42f1a23d716d5f1116ebbb0ad71619ed1a Author: Volker Lendecke Date: Fri Jun 8 14:25:23 2012 +0200 s3: Assigning ?True:False to a bool is a bit pointless Signed-off-by: Michael Adam commit e1e1fbcfe6fd79f588b2daea7827c90cd1f24008 Author: Volker Lendecke Date: Fri Jun 8 14:24:41 2012 +0200 s3: Remove unnecessary () Signed-off-by: Michael Adam --- Summary of changes: source3/smbd/files.c | 10 -- source3/smbd/open.c | 14 ++ source3/smbd/oplock.c | 11 ++- source3/smbd/proto.h |2 +- 4 files changed, 17 insertions(+), 20 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 33adaea..c0ebb98 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -603,12 +603,10 @@ NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from, to->share_access = share_access; to->oplock_type = from->oplock_type; to->can_lock = from->can_lock; - to->can_read = (access_mask & (FILE_READ_DATA)) ? True : False; - if (!CAN_WRITE(from->conn)) { - to->can_write = False; - } else { - to->can_write = (access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) ? True : False; - } + to->can_read = ((access_mask & FILE_READ_DATA) != 0); + to->can_write = + CAN_WRITE(from->conn) && + ((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0); to->modified = from->modified; to->is_directory = from->is_directory; to->aio_write_behind = from->aio_write_behind; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e753e78..4581553 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -776,13 +776,10 @@ static NTSTATUS open_file(files_struct *fsp, fsp->vuid = req ? req->vuid : UID_FIELD_INVALID; fsp->file_pid = req ? req->smbpid : 0; fsp->can_lock = True; - fsp->can_read = (access_mask & (FILE_READ_DATA)) ? True : False; - if (!CAN_WRITE(conn)) { - fsp->can_write = False; - } else { - fsp->can_write = (access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) ? - True : False; - } + fsp->can_read = ((access_mask & FILE_READ_DATA) != 0); + fsp->can_write = + CAN_WRITE(conn) && + ((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) != 0); fsp->print_file = NULL; fsp->modified = False; fsp->sent_oplock_break = NO_BREAK_SENT; @@ -2411,7 +2408,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, * file structs. */ - if (!set_file_oplock(fsp, fsp->oplock_type)) { + status = set_file_oplock(fsp, fsp->oplock_type); + if (!NT_STATUS_IS_OK(status)) { /* * Could not get the kernel oplock or there are byte-range * locks on the file. diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 19886fc..835ea36 1006
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b725154 tevent: change version to 0.9.16 via ba65400 tevent: expose tevent_context_init_ops via 796acbd lib/tevent: Add trace point callback via 653cb76 lib/tevent: In poll_event_context, add a pointer back to the tevent_context from 41d830e s3:smbd: remove unnecessary variable readret from read_file() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b725154fe7c49254093661d634c41f3fbfa46678 Author: Stefan Metzmacher Date: Fri Jun 8 12:50:21 2012 +0200 tevent: change version to 0.9.16 This adds tevent_*_trace_*() and tevent_context_init_ops() metze Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Fri Jun 8 20:47:41 CEST 2012 on sn-devel-104 commit ba65400c6ee710b8b5857af5825a784b5c2d0d47 Author: Stefan Metzmacher Date: Fri May 11 15:19:55 2012 +0200 tevent: expose tevent_context_init_ops This can be used to implement wrapper backends, while passing a private pointer to the backens init function via ev->additional_data. metze commit 796acbd9ffd20f13f320641b8a27f86624f3d701 Author: Martin Schwenke Date: Tue Jun 5 16:00:07 2012 +1000 lib/tevent: Add trace point callback Set/get a single callback function to be invoked at various trace points. Define "before wait" and "after wait" trace points - more trace points can be added later if required. CTDB wants this to log long waits and events. Pair-programmed-with: Amitay Isaacs Signed-off-by: Martin Schwenke Signed-off-by: Stefan Metzmacher commit 653cb76edfc3e9c2c426a6f8ec6ecfb253bd54d9 Author: Martin Schwenke Date: Thu Jun 7 12:26:02 2012 +1000 lib/tevent: In poll_event_context, add a pointer back to the tevent_context This makes it consistent with the other backends. Signed-off-by: Martin Schwenke Signed-off-by: Stefan Metzmacher --- Summary of changes: .../ABI/{tevent-0.9.14.sigs => tevent-0.9.16.sigs} |4 ++ lib/tevent/tevent.c|8 ++- lib/tevent/tevent.h| 57 lib/tevent/tevent_debug.c | 23 lib/tevent/tevent_epoll.c |2 + lib/tevent/tevent_internal.h |8 +++ lib/tevent/tevent_poll.c |6 ++ lib/tevent/tevent_select.c |2 + lib/tevent/tevent_standard.c |2 + lib/tevent/wscript |2 +- 10 files changed, 110 insertions(+), 4 deletions(-) copy lib/tevent/ABI/{tevent-0.9.14.sigs => tevent-0.9.16.sigs} (94%) mode change 100644 => 100755 lib/tevent/wscript Changeset truncated at 500 lines: diff --git a/lib/tevent/ABI/tevent-0.9.14.sigs b/lib/tevent/ABI/tevent-0.9.16.sigs similarity index 94% copy from lib/tevent/ABI/tevent-0.9.14.sigs copy to lib/tevent/ABI/tevent-0.9.16.sigs index 13c461c..ea7f944 100644 --- a/lib/tevent/ABI/tevent-0.9.14.sigs +++ b/lib/tevent/ABI/tevent-0.9.16.sigs @@ -33,11 +33,13 @@ tevent_common_loop_wait: int (struct tevent_context *, const char *) tevent_common_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *) tevent_context_init: struct tevent_context *(TALLOC_CTX *) tevent_context_init_byname: struct tevent_context *(TALLOC_CTX *, const char *) +tevent_context_init_ops: struct tevent_context *(TALLOC_CTX *, const struct tevent_ops *, void *) tevent_debug: void (struct tevent_context *, enum tevent_debug_level, const char *, ...) tevent_fd_get_flags: uint16_t (struct tevent_fd *) tevent_fd_set_auto_close: void (struct tevent_fd *) tevent_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) tevent_fd_set_flags: void (struct tevent_fd *, uint16_t) +tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *) tevent_loop_allow_nesting: void (struct tevent_context *) tevent_loop_set_nesting_hook: void (struct tevent_context *, tevent_nesting_hook, void *) tevent_queue_add: bool (struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *) @@ -65,6 +67,7 @@ tevent_set_abort_fn: void (void (*)(const char *)) tevent_set_debug: int (struct tevent_context *, void (*)(void *, enum tevent_debug_level, const char *, va_list), void *) tevent_set_debug_stderr: int (struct tevent_context *) tevent_set_default_backend: void (const char *) +tevent_set_trace_callback: void (struct tevent_context *, tevent_trace_callback_t, void *) tevent_signal_support: bool (struct tevent_context *) tevent_timeval_add: struct timeval (const struct timeva
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 41d830e s3:smbd: remove unnecessary variable readret from read_file() via eb750d5 s3:smbd: remove ancient DMF_FIX from read_file(). from 80d3702 build: do not run fsrvp tests as part of selftest http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 41d830ea4fb8bf7cb20e08607ba9db9f53c03880 Author: Michael Adam Date: Fri Jun 8 16:06:24 2012 +0200 s3:smbd: remove unnecessary variable readret from read_file() Pair-Programmed-With: Volker Lendecke Autobuild-User(master): Michael Adam Autobuild-Date(master): Fri Jun 8 18:08:09 CEST 2012 on sn-devel-104 commit eb750d54589542d9e6d9d48ff3bed1890cee7050 Author: Michael Adam Date: Fri Jun 8 14:23:09 2012 +0200 s3:smbd: remove ancient DMF_FIX from read_file(). Pair-Programmed-With: Volker Lendecke --- Summary of changes: source3/smbd/fileio.c | 25 +++-- 1 files changed, 3 insertions(+), 22 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index ab505f4..a14be78 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -64,7 +64,7 @@ static bool read_from_write_cache(files_struct *fsp,char *data,off_t pos,size_t ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n) { - ssize_t ret=0,readret; + ssize_t ret = 0; /* you can't read from print files */ if (fsp->print_file) { @@ -87,30 +87,11 @@ ssize_t read_file(files_struct *fsp,char *data,off_t pos,size_t n) fsp->fh->pos = pos; if (n > 0) { -#ifdef DMF_FIX - int numretries = 3; -tryagain: - readret = SMB_VFS_PREAD(fsp,data,n,pos); - - if (readret == -1) { - if ((errno == EAGAIN) && numretries) { - DEBUG(3,("read_file EAGAIN retry in 10 seconds\n")); - (void)sleep(10); - --numretries; - goto tryagain; - } - return -1; - } -#else /* NO DMF fix. */ - readret = SMB_VFS_PREAD(fsp,data,n,pos); + ret = SMB_VFS_PREAD(fsp,data,n,pos); - if (readret == -1) { + if (ret == -1) { return -1; } -#endif - if (readret > 0) { - ret += readret; - } } DEBUG(10,("read_file (%s): pos = %.0f, size = %lu, returned %lu\n", -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 80d3702 build: do not run fsrvp tests as part of selftest via 53c62bc s4-torture: fsrvp test suite via 34aa2bd doc: add FSRVP commands to rpcclient man page via ac7b60a s3-rpcclient: add fsrvp commands via 2836787 idl: add File Server Remote VSS Protocol idl from 03767f5 samba_util: mark smb_panic as _NORETURN_. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 80d37023d10ac9cb7c71566933c5613631ce38b8 Author: David Disseldorp Date: Tue Jun 5 20:02:04 2012 +0200 build: do not run fsrvp tests as part of selftest Autobuild-User(master): David Disseldorp Autobuild-Date(master): Fri Jun 8 15:24:45 CEST 2012 on sn-devel-104 commit 53c62bca2f1a1dcb07c70aba67c17a51c2a4eab8 Author: David Disseldorp Date: Fri Mar 9 16:02:19 2012 +0100 s4-torture: fsrvp test suite Covers most operations defined by the File Server Remote VSS Protocol. commit 34aa2bd74912ea3e9afe7c8899bbbf028ee00765 Author: David Disseldorp Date: Tue Apr 3 14:17:35 2012 +0200 doc: add FSRVP commands to rpcclient man page commit ac7b60a17bd4c4dbfaa2d9bb9e1d246800940928 Author: David Disseldorp Date: Mon Mar 26 17:34:52 2012 +0200 s3-rpcclient: add fsrvp commands fss_create_expose connects to an FSRVP server and negotiates the creation and exposure of a share shadow-copy. shadow-copies of multiple shares can be requested with a single fss_create_expose request. ddiss@plati:~> bin/rpcclient -k -U 'LURCH\administrator%password' \ ncacn_np:lutze[sign] rpcclient $> fss_create_expose backup ro hyper 381884f2-b578-45ea-b8d2-cf82491f4011: shadow-copy set created ... share hyper@{B6137E21-9CBB-4547-A21D-E7AD40D0874B} exposed as a snapshot of \\lutze\hyper fss_delete removes the shadow-copy share: rpcclient $> fss_delete hyper 381884f2-b578-45ea-b8d2-cf82491f4011 \ b6137e21-9cbb-4547-a21d-e7ad40d0874 Shadow-copies can be created read-write or read-only. Experimenting with Windows Server "8" beta, a recovery complete call is required after creating a read-write (ATTR_AUTO_RECOVERY) shadow copy. Otherwise subsequent creation requests fail with FSRVP_E_SHADOW_COPY_SET_IN_PROGRESS. commit 2836787daa8e78efc7dd166c4f462ca392b3c4c2 Author: David Disseldorp Date: Tue Feb 21 14:04:42 2012 +0100 idl: add File Server Remote VSS Protocol idl MS-FSRVP preview documents used as reference. H_ERROR codes should be moved to a more generic file. --- Summary of changes: docs-xml/manpages-3/rpcclient.1.xml | 45 +++ librpc/idl/fsrvp.idl| 113 ++ librpc/idl/wscript_build|4 +- librpc/wscript_build| 12 +- selftest/skip |1 + source3/Makefile.in |8 +- source3/librpc/rpc/rpc_common.c |4 + source3/rpcclient/cmd_fss.c | 656 +++ source3/rpcclient/rpcclient.c |2 + source3/wscript_build |3 +- source4/torture/rpc/fsrvp.c | 571 ++ source4/torture/rpc/rpc.c |1 + source4/torture/wscript_build |4 +- 13 files changed, 1416 insertions(+), 8 deletions(-) create mode 100644 librpc/idl/fsrvp.idl create mode 100644 source3/rpcclient/cmd_fss.c create mode 100644 source4/torture/rpc/fsrvp.c Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/rpcclient.1.xml b/docs-xml/manpages-3/rpcclient.1.xml index 275acf9..4e3d30c 100644 --- a/docs-xml/manpages-3/rpcclient.1.xml +++ b/docs-xml/manpages-3/rpcclient.1.xml @@ -427,6 +427,51 @@ Comma Separated list of Files + FSRVP + + + fss_is_path_sup + + Check whether a share supports shadow-copy + requests + + + fss_get_sup_version + + Get supported FSRVP version from server + + + fss_create_expose + + Request shadow-copy creation and exposure + + + fss_delete + + Request shadow-copy share deletion + + + fss_has_shadow_copy + + Check for an associated share shadow-copy + + + fss_get_mapping + + Get shadow-copy share mapping information + + + fss_recovery_complete + + Flag read-write snapshot as recovery complete, + allowing further shadow-co
Remove unused finddcs_nbt (Re: [SCM] Samba Shared Repository - branch master updated)
Hi Andrew, > commit 06c90cb6f55701effa4cbafaf189a4de8471949b > Author: Andrew Bartlett > Date: Thu Jun 7 14:21:25 2012 +1000 > > s4-libcli: Remove unused finddcs_nbt > > This would only do the NBT getdc lookup for a single DC (but would > find multiple DCs at first stage), but more particular it of course > uses Netbios rather than DNS names. > > In any case it was also unused, as we use CLDAP for reliable DC > location these days. > > Found by callcatcher I think it's a bug that it's not used. Samba3 DCs doesn't support CLDAP. metze signature.asc Description: OpenPGP digital signature
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 03767f5 samba_util: mark smb_panic as _NORETURN_. from 0ea7152 s3-winbindd: call dump_core_setup after command line option has been parsed http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 03767f5f5ac0293ef61d960ad980636898bd64ba Author: Rusty Russell Date: Fri Jun 8 08:08:00 2012 +0930 samba_util: mark smb_panic as _NORETURN_. Signed-off-by: Rusty Russell Autobuild-User(master): Rusty Russell Autobuild-Date(master): Fri Jun 8 09:14:26 CEST 2012 on sn-devel-104 --- Summary of changes: lib/util/samba_util.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index f4ffe64..274dde8 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -76,7 +76,7 @@ _PUBLIC_ void fault_configure(smb_panic_handler_t panic_handler); _PUBLIC_ void fault_setup(void); _PUBLIC_ void fault_setup_disable(void); _PUBLIC_ void dump_core_setup(const char *progname, const char *logfile); -_PUBLIC_ void smb_panic(const char *reason); +_PUBLIC_ _NORETURN_ void smb_panic(const char *reason); /** -- Samba Shared Repository