Hello community,

here is the log from the commit of package samba for openSUSE:Factory checked 
in at 2014-12-16 14:47:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/samba (Old)
 and      /work/SRC/openSUSE:Factory/.samba.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "samba"

Changes:
--------
--- /work/SRC/openSUSE:Factory/samba/samba.changes      2014-12-06 
13:47:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.samba.new/samba.changes 2014-12-16 
14:46:26.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Dec  8 12:01:35 UTC 2014 - dd...@suse.com
+
+- Lookup FSRVP share snums at runtime rather than storing them persistently;
+  (bnc#908627).
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ samba.spec ++++++
--- /var/tmp/diff_new_pack.1yO0RE/_old  2014-12-16 14:46:28.000000000 +0100
+++ /var/tmp/diff_new_pack.1yO0RE/_new  2014-12-16 14:46:28.000000000 +0100
@@ -145,7 +145,7 @@
 %else
 %define        build_make_smp_mflags %{?jobs:-j%jobs}
 %endif
-%define SOURCE_TIMESTAMP 3336
+%define SOURCE_TIMESTAMP 3339
 %define BRANCH %{version}
 %global with_mitkrb5 1
 %global with_dc 0

++++++ patches.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/patches/series new/patches/series
--- old/patches/series  2014-12-05 15:13:54.000000000 +0100
+++ new/patches/series  2014-12-09 11:43:13.000000000 +0100
@@ -145,6 +145,8 @@
 suse/0008-printer_list-fix-talloc-tos-leak-of-tdb-record.patch -p0 # bnc 899558
 suse/0001-fsrvp-prune-shadow-copies-if-associated-path-doesn-t.patch -p0 # bnc 
876312
 suse/0001-doc-prune-stale-and-sequence-timeout-fssd-parameters.patch -p0 # bnc 
876312
+suse/0001-fsrvp-don-t-store-or-retrieve-snums-with-server-stat.patch -p0 # bnc 
908627
+suse/0002-fsrvp-lookup-base-share-snums-at-runtime.patch -p0 # bnc 908627
 
 # this one should always live at the end and should be redone
 # diabled cf. 280452
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/patches/suse/0001-fsrvp-don-t-store-or-retrieve-snums-with-server-stat.patch
 
new/patches/suse/0001-fsrvp-don-t-store-or-retrieve-snums-with-server-stat.patch
--- 
old/patches/suse/0001-fsrvp-don-t-store-or-retrieve-snums-with-server-stat.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/patches/suse/0001-fsrvp-don-t-store-or-retrieve-snums-with-server-stat.patch
    2014-12-09 11:41:32.000000000 +0100
@@ -0,0 +1,92 @@
+From ab49324914800d0a70ed29cad56697ed9e247636 Mon Sep 17 00:00:00 2001
+From: David Disseldorp <dd...@samba.org>
+Date: Mon, 8 Dec 2014 11:21:21 +0100
+Subject: [PATCH 1/2] fsrvp: don't store or retrieve snums with server state
+
+Share snums are not persistent, so should not be stored alongside other
+FSRVP server state.
+
+Signed-off-by: David Disseldorp <dd...@samba.org>
+---
+ source3/rpc_server/fss/srv_fss_state.c | 14 +++++++++-----
+ source4/torture/local/fsrvp_state.c    |  4 ----
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git source3/rpc_server/fss/srv_fss_state.c 
source3/rpc_server/fss/srv_fss_state.c
+index fea1506..ab0f3c1 100644
+--- source3/rpc_server/fss/srv_fss_state.c
++++ source3/rpc_server/fss/srv_fss_state.c
+@@ -59,8 +59,11 @@ static NTSTATUS fss_state_smap_store(TALLOC_CTX *mem_ctx,
+               return NT_STATUS_NO_MEMORY;
+       }
+ 
+-      /* @smap->sc_share_comment may be null if not exposed */
+-      len = tdb_pack(NULL, 0, FSS_DB_FMT_SMAP, smap->snum,
++      /*
++       * @smap->sc_share_comment may be null if not exposed.
++       * -1 field was previously used for snum storage.
++       */
++      len = tdb_pack(NULL, 0, FSS_DB_FMT_SMAP, -1,
+                      smap->share_name, smap->sc_share_name,
+                      (smap->sc_share_comment ? smap->sc_share_comment : ""),
+                      (int)smap->is_exposed);
+@@ -71,7 +74,7 @@ static NTSTATUS fss_state_smap_store(TALLOC_CTX *mem_ctx,
+       }
+       val.dsize = len;
+ 
+-      tdb_pack(val.dptr, val.dsize, FSS_DB_FMT_SMAP, smap->snum,
++      tdb_pack(val.dptr, val.dsize, FSS_DB_FMT_SMAP, -1,
+                smap->share_name, smap->sc_share_name,
+                (smap->sc_share_comment ? smap->sc_share_comment : ""),
+                (int)smap->is_exposed);
+@@ -268,6 +271,7 @@ static NTSTATUS fss_state_smap_retrieve(TALLOC_CTX 
*mem_ctx,
+       NTSTATUS status;
+       struct fss_sc_smap *smap;
+       int len;
++      int snum_ignored;
+       char *share_name;
+       char *sc_share_name;
+       char *sc_share_comment;
+@@ -278,7 +282,7 @@ static NTSTATUS fss_state_smap_retrieve(TALLOC_CTX 
*mem_ctx,
+       }
+ 
+       len = tdb_unpack(val->dptr, val->dsize, FSS_DB_FMT_SMAP,
+-                       &smap->snum, &share_name, &sc_share_name,
++                       &snum_ignored, &share_name, &sc_share_name,
+                        &sc_share_comment, (int *)&smap->is_exposed);
+       if  (len < 0) {
+               return NT_STATUS_NO_MEMORY;
+@@ -463,7 +467,7 @@ static int fss_state_retrieve_traverse(struct db_record 
*rec,
+               trv_state->sc_sets_count++;
+       } else {
+               /* global context and db vers */
+-              DEBUG(4, ("Ignoring fss srv db entry with key %s", key.dptr));
++              DEBUG(4, ("Ignoring fss srv db entry with key %s\n", key.dptr));
+       }
+ 
+       return 0;
+diff --git source4/torture/local/fsrvp_state.c 
source4/torture/local/fsrvp_state.c
+index 4842215..a7c26e9 100644
+--- source4/torture/local/fsrvp_state.c
++++ source4/torture/local/fsrvp_state.c
+@@ -118,7 +118,6 @@ static bool test_fsrvp_state_smap(struct torture_context 
*tctx,
+       struct fss_sc_smap *smap;
+ 
+       smap = talloc_zero(mem_ctx, struct fss_sc_smap);
+-      smap->snum = 42;
+       smap->share_name = talloc_strdup(mem_ctx, base_share_name);
+       smap->sc_share_name = talloc_strdup(mem_ctx, sc_share_name);
+       smap->sc_share_comment = talloc_strdup(mem_ctx, "test sc share 
comment");
+@@ -137,9 +136,6 @@ static bool test_fsrvp_state_smap_compare(struct 
torture_context *tctx,
+                                smap_2->sc_share_name,
+                                "smap sc share name strings differ");
+ 
+-      torture_assert_int_equal(tctx, smap_1->snum, smap_2->snum,
+-                               "smaps snums differ");
+-
+       torture_assert_str_equal(tctx, smap_1->share_name,
+                                smap_2->share_name,
+                                "smap share name strings differ");
+-- 
+2.1.2
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/patches/suse/0002-fsrvp-lookup-base-share-snums-at-runtime.patch 
new/patches/suse/0002-fsrvp-lookup-base-share-snums-at-runtime.patch
--- old/patches/suse/0002-fsrvp-lookup-base-share-snums-at-runtime.patch        
1970-01-01 01:00:00.000000000 +0100
+++ new/patches/suse/0002-fsrvp-lookup-base-share-snums-at-runtime.patch        
2014-12-09 11:41:32.000000000 +0100
@@ -0,0 +1,115 @@
+From 87602428db6cda214ba1a09648b957c2695f89e8 Mon Sep 17 00:00:00 2001
+From: David Disseldorp <dd...@samba.org>
+Date: Mon, 8 Dec 2014 11:39:10 +0100
+Subject: [PATCH 2/2] fsrvp: lookup base share snums at runtime
+
+Don't store/retrieve share snums across FSRVP operations, as they're not
+persistent. Instead, perform a lookup when needed.
+
+Signed-off-by: David Disseldorp <dd...@samba.org>
+---
+ source3/rpc_server/fss/srv_fss_agent.c   | 27 ++++++++++++++++++++-------
+ source3/rpc_server/fss/srv_fss_private.h |  3 +--
+ 2 files changed, 21 insertions(+), 9 deletions(-)
+
+diff --git source3/rpc_server/fss/srv_fss_agent.c 
source3/rpc_server/fss/srv_fss_agent.c
+index 6f11161..879b923 100644
+--- source3/rpc_server/fss/srv_fss_agent.c
++++ source3/rpc_server/fss/srv_fss_agent.c
+@@ -860,7 +860,6 @@ uint32_t _fss_AddToShadowCopySet(struct pipes_struct *p,
+               goto err_sc_free;
+       }
+ 
+-      sc_smap->snum = snum;
+       talloc_steal(sc_smap, service);
+       sc_smap->share_name = service;
+       sc_smap->is_exposed = false;
+@@ -921,6 +920,8 @@ static struct tevent_req 
*commit_sc_with_conn_send(TALLOC_CTX *mem_ctx,
+       struct fss_sc_commit_state *sc_commit_state;
+       NTSTATUS status;
+       bool rw;
++      int snum;
++      char *service;
+ 
+       req = tevent_req_create(mem_ctx, &sc_commit_state,
+                               struct fss_sc_commit_state);
+@@ -928,11 +929,17 @@ static struct tevent_req 
*commit_sc_with_conn_send(TALLOC_CTX *mem_ctx,
+               return NULL;
+       }
+ 
++      snum = find_service(sc_commit_state, sc->smaps->share_name, &service);
++      if ((snum == -1) || (service == NULL)) {
++              DEBUG(0, ("share at %s not found\n", sc->smaps->share_name));
++              tevent_req_nterror(req, NT_STATUS_UNSUCCESSFUL);
++              return tevent_req_post(req, ev);
++      }
++
+       sc_commit_state->session_info = session_info;
+ 
+       status = fss_vfs_conn_create(sc_commit_state,
+-                                   ev, msg_ctx, session_info,
+-                                   sc->smaps->snum,
++                                   ev, msg_ctx, session_info, snum,
+                                    &sc_commit_state->conn);
+       if (tevent_req_nterror(req, status)) {
+               return tevent_req_post(req, ev);
+@@ -1741,7 +1748,6 @@ struct fss_delete_state {
+       struct fss_sc *sc;
+       struct fss_sc_smap *sc_smap;
+       struct connection_struct *conn;
+-      int snum;
+ };
+ static void fss_delete_vfs_done(struct tevent_req *subreq);
+ 
+@@ -1758,6 +1764,8 @@ struct tevent_req *_fss_DeleteShareMapping_send(struct 
tevent_context *ev,
+       struct fss_sc_smap *sc_smap;
+       char *share;
+       NTSTATUS status;
++      int snum;
++      char *service;
+ 
+       req = tevent_req_create(mem_ctx, &delete_state,
+                               struct fss_delete_state);
+@@ -1791,7 +1799,6 @@ struct tevent_req *_fss_DeleteShareMapping_send(struct 
tevent_context *ev,
+               return tevent_req_post(req, ev);
+       }
+       delete_state->sc = sc;
+-      delete_state->snum = sc->smaps->snum;
+ 
+       status = fss_unc_parse(delete_state, r->in.ShareName, NULL, &share);
+       if (!NT_STATUS_IS_OK(status)) {
+@@ -1823,9 +1830,15 @@ struct tevent_req *_fss_DeleteShareMapping_send(struct 
tevent_context *ev,
+               return tevent_req_post(req, ev);
+       }
+ 
++      snum = find_service(delete_state, sc_smap->share_name, &service);
++      if ((snum == -1) || (service == NULL)) {
++              DEBUG(0, ("share at %s not found\n", sc_smap->share_name));
++              tevent_req_nterror(req, NT_STATUS_UNSUCCESSFUL);
++              return tevent_req_post(req, ev);
++      }
++
+       status = fss_vfs_conn_create(delete_state, ev, p->msg_ctx,
+-                                   delete_state->session_info,
+-                                   delete_state->snum,
++                                   delete_state->session_info, snum,
+                                    &delete_state->conn);
+       if (tevent_req_nterror(req, status)) {
+               return tevent_req_post(req, ev);
+diff --git source3/rpc_server/fss/srv_fss_private.h 
source3/rpc_server/fss/srv_fss_private.h
+index 854c2d7..4cefbcc 100644
+--- source3/rpc_server/fss/srv_fss_private.h
++++ source3/rpc_server/fss/srv_fss_private.h
+@@ -26,8 +26,7 @@
+ 
+ struct fss_sc_smap {
+       struct fss_sc_smap *next, *prev;
+-      int snum;
+-      char *share_name;               /* name of the file share */
++      char *share_name;               /* name of the base file share */
+       char *sc_share_name;            /* share exposing the shadow copy */
+       char *sc_share_comment;
+       bool is_exposed;                /* whether shadow copy is exposed */
+-- 
+2.1.2
+


++++++ vendor-files.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor-files/tools/package-data 
new/vendor-files/tools/package-data
--- old/vendor-files/tools/package-data 2014-12-05 15:21:41.000000000 +0100
+++ new/vendor-files/tools/package-data 2014-12-09 12:18:35.000000000 +0100
@@ -1,2 +1,2 @@
 # This is an autogenrated file.
-SAMBA_PACKAGE_SVN_VERSION="3336"
+SAMBA_PACKAGE_SVN_VERSION="3339"

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to