mdw/samba.git
10 years agoldb:pyldb.c - implementation of extended request handling py_exop
Matthias Dieter Wallnöfer [Tue, 21 Jun 2011 10:01:24 +0000 (12:01 +0200)]
ldb:pyldb.c - implementation of extended request handling

10 years agowaf: Fix the FreeBSD build with libinotify
Volker Lendecke [Tue, 17 Dec 2013 14:32:01 +0000 (15:32 +0100)]
waf: Fix the FreeBSD build with libinotify

Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  6 19:50:22 CET 2014 on sn-devel-104

10 years agos4:selftest: run wbinfo tests at the end...
Stefan Metzmacher [Fri, 3 Jan 2014 11:56:38 +0000 (12:56 +0100)]
s4:selftest: run wbinfo tests at the end...

This avoids flakey crashes in the promoted_dc environment.

See the examples below, we had up to 50% of the daily build failing...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
https://git.samba.org/autobuild.flakey/2013-12-23-1942/samba.stdout

  [1586/1594 in 1h39m20s] samba4.drs.fsmo.python(promoted_dc)
  Testing for schema role transfer from localdc.samba.example.com to PROMOTEDVDC.samba.example.com
  FSMO transfer of 'schema' role successful
  Testing for schema role transfer from PROMOTEDVDC.samba.example.com to localdc.samba.example.com
  ERROR: Failed to initiate transfer of 'schema' role: LDAP error 52 LDAP_UNAVAILABLE -  <Failed FSMO transfer: WERR_DS_DRA_INTERNAL_ERROR> <>
  UNEXPECTED(failure): samba4.drs.fsmo.python(promoted_dc).fsmo.DrsFsmoTestCase.test_SchemaMasterTransfer(promoted_dc)
  REASON: _StringException: _StringException: Content-Type: text/x-traceback;charset=utf8,language=python
  traceback
  380

https://git.samba.org/autobuild.flakey/2013-12-24-1546/samba.stdout

  [1583/1594 in 1h36m4s] samba.tests.blackbox.samba_tool_drs
  ERROR: Testsuite[samba.tests.blackbox.samba_tool_drs]
  REASON: unable to set up environment promoted_dc - exiting

https://git.samba.org/autobuild.flakey/2013-12-24-1546/samba.stderr

  Unable to convert 1.2.840.86419.1.5.9939 to an attid, and can_change_pfm=false!
  Unable to convert governsID on CN=test-class30318,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com to DRS object - WERR_NOT_FOUND
  ../source4/rpc_server/drsuapi/getncchanges.c:1646: DsGetNCChanges 2nd replication on different DN CN=Configuration,DC=samba,DC=example,DC=com CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com (last_dn CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com)
  ===============================================================
  INTERNAL ERROR: Signal 11 in pid 884274 (4.2.0pre1-DEVELOPERBUILD)
  Please read the Trouble-Shooting section of the Samba HOWTO
  ===============================================================
  smb_panic(): calling panic action [/memdisk/autobuild/fl/b302436/samba/selftest/gdb_backtrace 884274]
  [Thread debugging using libthread_db enabled]
  0x00002af6b5c1977e in __libc_waitpid (pid=<value optimized out>,
      stat_loc=0x7fff67c7709c, options=<value optimized out>)
      at ../sysdeps/unix/sysv/linux/waitpid.c:32
  32 ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
   in ../sysdeps/unix/sysv/linux/waitpid.c
  #0  0x00002af6b5c1977e in __libc_waitpid (pid=<value optimized out>,
      stat_loc=0x7fff67c7709c, options=<value optimized out>)
      at ../sysdeps/unix/sysv/linux/waitpid.c:32
          oldtype = <value optimized out>
          result = <value optimized out>
  #1  0x00002af6b5baeb39 in do_system (line=<value optimized out>)
      at ../sysdeps/posix/system.c:149
          __result = -512
          _buffer = {__routine = 0x2af6b5baee90 <cancel_handler>,
            __arg = 0x7fff67c77098, __canceltype = 0, __prev = 0x0}
          _avail = 1
          status = <value optimized out>
          save = <value optimized out>
          pid = 886733
          sa = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1},
            sa_mask = {__val = {65536, 0 <repeats 15 times>}}, sa_flags = 0,
            sa_restorer = 0x2af6b5b730f0}
          omask = {__val = {7808, 4294967295140734934511616, 1, 2195512, 0,
              0, 0, 4723903227494447239027992529140733193388033, 0, 0,
              4723909900312014073493451179247239558787328}}
  #2  0x00002af6b311821f in smb_panic_default (
      why=0x2af6b312a875 "internal error") at ../lib/util/fault.c:134
          result = 32767
          pidstr = "884274\000\000\001\375\376\320\366*\000\000\260\377\377\377"
          cmdstring = "/memdisk/autobuild/fl/b302436/samba/selftest/gdb_backtrace 884274\000\307g\377\177\000\000\001\000\000\000\000\000\000\000\320\301#", '\000' <repeats 30 times>"\240, \017\263\366*\000\000\321\247{\261\366*\000\000\001\000\000\000\005", '\000' <repeats 11 times>"\260, \016\v\321\366*\000\000X\351\017\263\366*\000\000\260q\307g\377\177\000\000\000\361\036\321\366*\000\000\020r\307g\377\177\000\000\240\301z\326\366*\000\000\000Z\304\320\366*\000"
          __FUNCTION__ = "smb_panic_default"
  #3  0x00002af6b31183b5 in smb_panic (why=0x2af6b312a875 "internal error")
      at ../lib/util/fault.c:162
  No locals.
  #4  0x00002af6b311809f in fault_report (sig=11) at ../lib/util/fault.c:77
          counter = 1
          __FUNCTION__ = "fault_report"
  #5  0x00002af6b31180b4 in sig_fault (sig=11) at ../lib/util/fault.c:88
  No locals.
  #6  <signal handler called>
  No symbol table info available.
  #7  0x00002af6cabef930 in replmd_check_urgent_objectclass (
      objectclass_el=0x0, situation=REPL_URGENT_ON_UPDATE)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:205
          i = 2
          j = 0
  #8  0x00002af6cabf29b6 in replmd_update_rpmd (module=0x2af6b17f2c20,
      schema=0x2af6d05e5570, req=0x2af6d05e8ad0, rename_attrs=0x0,
      msg=0x2af6d11ef100, seq_num=0x2af6d0c315b8, t=1387895162,
      is_urgent=0x7fff67c778bf, rodc=0x7fff67c778be)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:1432
          omd_value = 0x7fff67c77810
          ndr_err = 3508465920
          omd = {version = 1741125552, reserved = 32767, ctr = {ctr1 = {
                count = 3008684740, reserved = 10998, array = 0x7fff67c777b0}}}
          i = 10998
          now = 130323687620000000
          our_invocation_id = 0x2af6d1796390
          ret = 0
          attrs = 0x7fff67c77750
          attrs1 = {0x2af6cabff775 "replPropertyMetaData", 0x2af6cabffc8b "*",
            0x0}
          attrs2 = {0x2af6cabff76a "uSNChanged", 0x2af6cabffa98 "objectClass",
            0x2af6cabffc8d "instanceType", 0x0}
          res = 0x2af6d10b0eb0
          ldb = 0x2af6b17f2470
          objectclass_el = 0x0
          situation = REPL_URGENT_ON_UPDATE
          rmd_is_provided = false
          __FUNCTION__ = "replmd_update_rpmd"
  #9  0x00002af6cabf5a06 in replmd_modify (module=0x2af6b17f2c20,
      req=0x2af6d05e8ad0)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:2455
          msds_intid_struct = 0x2af6d05e8ad0
          ldb = 0x2af6b17f2470
          ac = 0x2af6d0c31580
          down_req = 0x2af6d0e6a100
          msg = 0x2af6d11ef100
          t = 1387895162
          ret = 1741125936
          is_urgent = false
          rodc = false
          functional_level = 3
          guid_blob = 0x0
          sd_propagation_control = 0x0
  #10 0x00002af6bf69f94d in dsdb_module_modify (module=0x2af6b17f2c20,
      message=0x2af6d1183fe0, dsdb_flags=4194304, parent=0x2af6ce6ea980)
      at ../source4/dsdb/samdb/ldb_modules/util.c:460
          ops = 0x2af6cae06b40
          mod_req = 0x2af6d05e8ad0
          ret = 0
          ldb = 0x2af6b17f2470
          tmp_ctx = 0x2af6d0ed62f0
          res = 0x2af6d0e6a100
          __FUNCTION__ = "dsdb_module_modify"
  #11 0x00002af6cabf7ebc in replmd_delete_internals (module=0x2af6b17f2c20,
      req=0x2af6ce6ea980, re_delete=true)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:3309
          ret = 0
          retb = true
          disallow_move_on_delete = false
          old_dn = 0x2af6d6a2a010
          new_dn = 0x2af6d0794a90
          rdn_name = 0x2af6d0885c10 "CN"
          rdn_value = 0x2af6d10d7368
          new_rdn_value = 0x2af6d0c45a00
          guid = {time_low = 48, time_mid = 0, time_hi_and_version = 0,
            clock_seq = "\200\251", node = "n\316\366*\000"}
          ldb = 0x2af6b17f2470
          schema = 0x2af6d05e5570
          msg = 0x2af6d1183fe0
          old_msg = 0x2af6d1902800
          el = 0x2af6d0874900
          tmp_ctx = 0x2af6d0b77560
          res = 0x2af6d0d57980
          parent_res = 0x30
          preserved_attrs = {0x2af6cac00fe1 "nTSecurityDescriptor",
            0x2af6cac055c3 "attributeID", 0x2af6cac055cf "attributeSyntax",
            0x2af6cac055df "dNReferenceUpdate", 0x2af6cac055f1 "dNSHostName",
            0x2af6cac055fd "flatName", 0x2af6cac05606 "governsID",
            0x2af6cac05610 "groupType", 0x2af6cabffc8d "instanceType",
            0x2af6cac0561a "lDAPDisplayName",
            0x2af6cac0562a "legacyExchangeDN", 0x2af6cabfe94d "isDeleted",
            0x2af6cabfe957 "isRecycled", 0x2af6cac020f8 "lastKnownParent",
            0x2af6cac021e8 "msDS-LastKnownRDN",
            0x2af6cac0563b "mS-DS-CreatorSID", 0x2af6cac0564c "mSMQOwnerID",
            0x2af6cac05658 "nCName", 0x2af6cabffa98 "objectClass",
            0x2af6cac0565f "distinguishedName", 0x2af6cabff5b5 "objectGUID",
            0x2af6cac05671 "objectSid", 0x2af6cac0567b "oMSyntax",
            0x2af6cac05684 "proxiedObjectName", 0x2af6cac014d8 "name",
            0x2af6cabff775 "replPropertyMetaData",
            0x2af6cac05696 "sAMAccountName",
            0x2af6cac056a5 "securityIdentifier", 0x2af6cac056b8 "sIDHistory",
            0x2af6cac056c3 "subClassOf", 0x2af6cac01ba8 "systemFlags",
            0x2af6cac056ce "trustPartner", 0x2af6cac056db "trustDirection",
            0x2af6cac056ea "trustType", 0x2af6cac056f4 "trustAttributes",
            0x2af6cabfe9b8 "userAccountControl", 0x2af6cabff76a "uSNChanged",
            0x2af6cabff75f "uSNCreated", 0x2af6cabff747 "whenCreated",
            0x2af6cabff753 "whenChanged", 0x0}
          i = 12
          el_count = 1
          deletion_state = OBJECT_TOMBSTONE
          next_deletion_state = OBJECT_TOMBSTONE
          __FUNCTION__ = "replmd_delete_internals"
  #12 0x00002af6cabfbbe3 in replmd_replicated_apply_isDeleted (
      ar=0x2af6d74c0b40)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:4718
          del_req = 0x2af6ce6ea980
          res = 0x2af6d0cdebf0
          tmp_ctx = 0x2af6d0949230
          deleted_objects_dn = 0x2af6d1a49f00
          msg = 0x2af6d0a39620
          ret = 0
  #13 0x00002af6cabf0766 in replmd_op_callback (req=0x2af6d05a21e0,
      ares=0x2af6d0d715c0)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:526
          ret = 10998
          ac = 0x2af6d74c0b40
          replmd_private = 0x2af6b188c7c0
          modified_partition = 0x2af6d141b670
          partition_ctrl = 0x2af6d1905f40
          partition = 0x2af6ce6bdbe0
          controls = 0x0
          __FUNCTION__ = "replmd_op_callback"
  #14 0x00002af6b1df7ca2 in ldb_module_done (req=0x2af6d05a21e0,
      ctrls=0x2af6d1629aa0, response=0x0, error=0)
      at ../lib/ldb/common/ldb_modules.c:832
          ares = 0x2af6d0d715c0
  #15 0x00002af6cabf896b in replmd_op_possible_conflict_callback (
      req=0x2af6d05a21e0, ares=0x2af6b1883eb0,
      callback=0x2af6cabf0334 <replmd_op_callback>)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:3606
          conflict_dn = 0x2af6cac03470
          ar = 0x2af6d74c0b40
          res = 0x2af6b354f89b
          attrs = {0x2af6cabff775 "replPropertyMetaData",
            0x2af6cabff5b5 "objectGUID", 0x0}
          ret = -682882240
          omd_value = 0x7fff67c77e20
          omd = {version = 1741127104, reserved = 32767, ctr = {ctr1 = {
                count = 0, reserved = 0, array = 0x28}}}
          rmd = 0x2af6d74c0ae0
          ndr_err = 10998
          rename_incoming_record = false
          rodc = false
          rmd_name = 0x7fff67c77e10
          omd_name = 0x2af6d74c0b40
          msg = 0x2af6b1883e50
          __FUNCTION__ = "replmd_op_possible_conflict_callback"
  #16 0x00002af6cabf93fb in replmd_op_add_callback (req=0x2af6d05a21e0,
      ares=0x2af6b1883eb0)
      at ../source4/dsdb/samdb/ldb_modules/repl_meta_data.c:3802
          ar = 0x2af6d74c0b40
  #17 0x00002af6b1df7ca2 in ldb_module_done (req=0x2af6d05a21e0,
      ctrls=0x2af6d1629aa0, response=0x0, error=0)
      at ../lib/ldb/common/ldb_modules.c:832
          ares = 0x2af6b1883eb0
  #18 0x00002af6ca3c8b6a in partition_req_callback (req=0x2af6d087a1e0,
      ares=0x2af6d05a1fa0) at ../source4/dsdb/samdb/ldb_modules/partition.c:213
          ac = 0x2af6d0949370
          module = 0x2af6cd27bf12
          nreq = 0x2af6d05b67b0
          ret = 0
          partition_ctrl = 0x2af6d0d71740
  #19 0x00002af6cd2752ab in ltdb_request_done (ctx=0x2af6d1cd7ed0, error=0)
      at ../lib/ldb/ldb_tdb/ldb_tdb.c:1280
          ldb = 0x2af6b17f2470
          req = 0x2af6d087a1e0
          ares = 0x2af6d05a1fa0
  #20 0x00002af6cd275597 in ltdb_callback (ev=0x2af6b17ef8c0,
      te=0x2af6d17f75d0, t=..., private_data=0x2af6d1cd7ed0)
      at ../lib/ldb/ldb_tdb/ldb_tdb.c:1390
          ctx = 0x2af6d1cd7ed0
          ret = 0
  #21 0x00002af6b3343259 in tevent_common_loop_timer_delay (ev=0x2af6b17ef8c0)
      at ../lib/tevent/tevent_timed.c:341
          current_time = {tv_sec = 0, tv_usec = 0}
          te = 0x2af6d17f75d0
  #22 0x00002af6b334558a in epoll_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b1e1eef8 "../lib/ldb/common/ldb.c:621")
      at ../lib/tevent/tevent_epoll.c:912
          epoll_ev = 0x2af6b17efb00
          tval = {tv_sec = 47239056876603, tv_usec = 47239028210096}
          panic_triggered = false
  #23 0x00002af6b3342363 in std_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b1e1eef8 "../lib/ldb/common/ldb.c:621")
      at ../lib/tevent/tevent_standard.c:112
          glue_ptr = 0x2af6b17ef9b0
          glue = 0x2af6b17ef9b0
          ret = 10998
  #24 0x00002af6b333c799 in _tevent_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b1e1eef8 "../lib/ldb/common/ldb.c:621")
      at ../lib/tevent/tevent.c:530
          ret = 0
          nesting_stack_ptr = 0x0
  #25 0x00002af6b1e154c4 in ldb_wait (handle=0x2af6d67624c0, type=LDB_WAIT_ALL)
      at ../lib/ldb/common/ldb.c:621
          ev = 0x2af6b17ef8c0
          ret = 0
  #26 0x00002af6b1e1786b in ldb_extended (ldb=0x2af6b17f2470,
      oid=0x2af6b4c4f9ce "1.3.6.1.4.1.7165.4.4.1", data=0x2af6d0e2bc60,
      _res=0x7fff67c78240) at ../lib/ldb/common/ldb.c:1506
          req = 0x2af6d0c45a00
          ret = 0
          res = 0x2af6d69238f0
  #27 0x00002af6b4c4a0d6 in dsdb_replicated_objects_commit (ldb=0x2af6b17f2470,
      working_schema=0x0, objects=0x2af6d0e2bc60, notify_uSN=0x2af6d14a65f0)
      at ../source4/dsdb/repl/replicated_objects.c:773
          werr = {w = 0}
          ext_res = 0x0
          cur_schema = 0x0
          new_schema = 0x0
          ret = 0
          seq_num1 = 5554
          seq_num2 = 47239626746464
          used_global_schema = false
          tmp_ctx = 0x2af6d03c5860
          __FUNCTION__ = "dsdb_replicated_objects_commit"
  #28 0x00002af6c1c6babb in dreplsrv_op_pull_source_apply_changes_trigger (
      req=0x2af6d17daed0, r=0x2af6d17db0d0, ctr_level=6, ctr1=0x0,
      ctr6=0x2af6d1b02bb0) at ../source4/dsdb/repl/drepl_out_helpers.c:717
          state = 0x2af6d17db050
          rf1 = {blobsize = 274, consecutive_sync_failures = 0,
            last_success = 130323684670000000,
            last_attempt = 130323687610000000, result_last_attempt = {w = 0},
            other_info = 0x2af6d0949910, other_info_length = 66,
            replica_flags = 112, schedule = '\021' <repeats 84 times>,
            reserved = 0, highwatermark = {tmp_highest_usn = 12398,
              reserved_usn = 0, highest_usn = 12398}, source_dsa_obj_guid = {
              time_low = 984092159, time_mid = 850,
              time_hi_and_version = 18870, clock_seq = "\251X",
              node = "UF\324\223\205\241"}, source_dsa_invocation_id = {
              time_low = 1460694408, time_mid = 52035,
              time_hi_and_version = 18738, clock_seq = "\204}",
              node = "\264\365\276\372\256\303"}, transport_guid = {
              time_low = 0, time_mid = 0, time_hi_and_version = 0,
              clock_seq = "\000", node = "\000\000\000\000\000"}}
          service = 0x2af6d0ff6b00
          partition = 0x2af6d0b6f220
          drsuapi = 0x2af6d1c8d480
          schema = 0x2af6d05e5570
          working_schema = 0x0
          mapping_ctr = 0x2af6d1b02c10
          object_count = 50
          first_object = 0x2af6d0571800
          linked_attributes_count = 0
          linked_attributes = 0x2af6d5212140
          uptodateness_vector = 0x2af6d1a741c0
          objects = 0x2af6d0e2bc60
          more_data = false
          status = {w = 0}
          nt_status = {v = 3006553120}
          dsdb_repl_flags = 0
          __FUNCTION__ = "dreplsrv_op_pull_source_apply_changes_trigger"
  #29 0x00002af6c1c6b3e7 in dreplsrv_op_pull_source_get_changes_done (
      subreq=0x0) at ../source4/dsdb/repl/drepl_out_helpers.c:599
          req = 0x2af6d17daed0
          state = 0x2af6d17db050
          status = {v = 0}
          r = 0x2af6d17db0d0
          ctr_level = 6
          ctr1 = 0x0
          ctr6 = 0x2af6d1b02bb0
          extended_ret = DRSUAPI_EXOP_ERR_NONE
  #30 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d1a73f70,
      location=0x2af6c1c7d5f8 "default/librpc/gen_ndr/ndr_drsuapi_c.c:712")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #31 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d1a73f70,
      state=TEVENT_REQ_DONE,
      location=0x2af6c1c7d5f8 "default/librpc/gen_ndr/ndr_drsuapi_c.c:712")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #32 0x00002af6b333e374 in _tevent_req_done (req=0x2af6d1a73f70,
      location=0x2af6c1c7d5f8 "default/librpc/gen_ndr/ndr_drsuapi_c.c:712")
      at ../lib/tevent/tevent_req.c:123
  No locals.
  #33 0x00002af6c1c708df in dcerpc_drsuapi_DsGetNCChanges_r_done (
      subreq=0x2af6d122f4c0) at default/librpc/gen_ndr/ndr_drsuapi_c.c:712
          req = 0x2af6d1a73f70
          status = {v = 0}
  #34 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d122f4c0,
      location=0x2af6b575b688 "../librpc/rpc/binding_handle.c:517")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #35 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d122f4c0,
      state=TEVENT_REQ_DONE,
      location=0x2af6b575b688 "../librpc/rpc/binding_handle.c:517")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #36 0x00002af6b333e374 in _tevent_req_done (req=0x2af6d122f4c0,
      location=0x2af6b575b688 "../librpc/rpc/binding_handle.c:517")
      at ../lib/tevent/tevent_req.c:123
  No locals.
  #37 0x00002af6b5757ede in dcerpc_binding_handle_call_done (subreq=0x0)
      at ../librpc/rpc/binding_handle.c:517
          req = 0x2af6d122f4c0
          state = 0x2af6d122f640
          h = 0x2af6d0959d10
          error = {v = 0}
          out_flags = 0
          ndr_err = NDR_ERR_SUCCESS
  #38 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d522f7a0,
      location=0x2af6b575b1d0 "../librpc/rpc/binding_handle.c:188")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #39 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d522f7a0,
      state=TEVENT_REQ_DONE,
      location=0x2af6b575b1d0 "../librpc/rpc/binding_handle.c:188")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #40 0x00002af6b333e374 in _tevent_req_done (req=0x2af6d522f7a0,
      location=0x2af6b575b1d0 "../librpc/rpc/binding_handle.c:188")
      at ../lib/tevent/tevent_req.c:123
  No locals.
  #41 0x00002af6b5757398 in dcerpc_binding_handle_raw_call_done (subreq=0x0)
      at ../librpc/rpc/binding_handle.c:188
          req = 0x2af6d522f7a0
          state = 0x2af6d522f920
          error = {v = 0}
  #42 0x00002af6b333e2f8 in _tevent_req_notify_callback (req=0x2af6d0712430,
      location=0x2af6b44b8810 "../source4/librpc/rpc/dcerpc.c:322")
      at ../lib/tevent/tevent_req.c:102
  No locals.
  #43 0x00002af6b333e34d in tevent_req_finish (req=0x2af6d0712430,
      state=TEVENT_REQ_DONE,
      location=0x2af6b44b8810 "../source4/librpc/rpc/dcerpc.c:322")
      at ../lib/tevent/tevent_req.c:117
  No locals.
  #44 0x00002af6b333e472 in tevent_req_trigger (ev=0x2af6b17ef8c0,
      im=0x2af6d0712500, private_data=0x2af6d0712430)
      at ../lib/tevent/tevent_req.c:174
          req = 0x2af6d0712430
  #45 0x00002af6b333d6d4 in tevent_common_loop_immediate (ev=0x2af6b17ef8c0)
      at ../lib/tevent/tevent_immediate.c:135
          im = 0x2af6d0712500
          handler = 0x2af6b333e423 <tevent_req_trigger>
          private_data = 0x2af6d0712430
  #46 0x00002af6b3345570 in epoll_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent_epoll.c:907
          epoll_ev = 0x2af6b17efb00
          tval = {tv_sec = 47239056876603, tv_usec = 47239028210096}
          panic_triggered = false
  #47 0x00002af6b3342363 in std_event_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent_standard.c:112
          glue_ptr = 0x2af6b17ef9b0
          glue = 0x2af6b17ef9b0
          ret = 10998
  #48 0x00002af6b333c799 in _tevent_loop_once (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent.c:530
          ret = 0
          nesting_stack_ptr = 0x0
  #49 0x00002af6b333ca11 in tevent_common_loop_wait (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent.c:634
          ret = 0
  #50 0x00002af6b3342405 in std_event_loop_wait (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent_standard.c:138
          glue_ptr = 0x2af6b17ef9b0
          glue = 0x2af6b17ef9b0
          ret = 10998
  #51 0x00002af6b333cadc in _tevent_loop_wait (ev=0x2af6b17ef8c0,
      location=0x2af6b15a7b9f "../source4/smbd/server.c:503")
      at ../lib/tevent/tevent.c:653
  No locals.
  #52 0x00002af6b15a37bc in binary_smbd_main (
      binary_name=0x2af6b15a737b "samba", argc=6, argv=0x7fff67c78de8)
      at ../source4/smbd/server.c:503
          opt_daemon = false
          opt_interactive = true
          opt = -1
          pc = 0x2af6b17d5040
          static_init = {0x2af6b2ac7d8c <server_service_auth_init>,
            0x2af6b2aca9e7 <server_service_echo_init>, 0}
          shared_init = 0x2af6b18143b0
          event_ctx = 0x2af6b17ef8c0
          stdin_event_flags = 1
          status = {v = 0}
          model = 0x2af6b17d5b90 "single"
          max_runtime = 7500

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jan  6 01:16:13 CET 2014 on sn-devel-104

10 years agoHappy New Year 2014!
Stefan Metzmacher [Thu, 2 Jan 2014 13:04:26 +0000 (14:04 +0100)]
Happy New Year 2014!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoCompare the correct values
Simo Sorce [Thu, 26 Dec 2013 04:28:58 +0000 (23:28 -0500)]
Compare the correct values

Reported by herwin <samba@herwinw.nl>
Resolves: https://bugzilla.samba.org/show_bug.cgi?id=10349

Signed-off-by: Simo Sorce <idra@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 27 20:39:54 CET 2013 on sn-devel-104

10 years agoDo not return a value from a void function.
Simo Sorce [Thu, 26 Dec 2013 04:20:58 +0000 (23:20 -0500)]
Do not return a value from a void function.

Reported by herwin <samba@herwinw.nl>
Resolves: https://bugzilla.samba.org/show_bug.cgi?id=10346

Signed-off-by: Simo Sorce <idra@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolibcli/auth: try to use the current timestamp creds->sequence
Stefan Metzmacher [Tue, 17 Dec 2013 18:55:12 +0000 (19:55 +0100)]
libcli/auth: try to use the current timestamp creds->sequence

If the last usage of netlogon_creds_client_authenticator()
is in the past try to use the current timestamp and increment
more than just 2.

If we use netlogon_creds_client_authenticator() a lot within a
second, we increment keep incrementing by 2.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec 24 13:18:18 CET 2013 on sn-devel-104

10 years agolibcli/auth: remove bogus comment regarding replay attacks
Stefan Metzmacher [Tue, 17 Dec 2013 18:40:15 +0000 (19:40 +0100)]
libcli/auth: remove bogus comment regarding replay attacks

creds->sequence (timestamp) is the value that is used to increment the internal
state, it's not a real sequence number. The sequence comes
from adding all timestamps of the whole session.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibcli/auth: set the return_authenticator->timestamp = 0
Stefan Metzmacher [Tue, 17 Dec 2013 18:35:37 +0000 (19:35 +0100)]
libcli/auth: set the return_authenticator->timestamp = 0

This is what windows returns, the value is ignored by the client anyway.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: add rodc and other env tests for wbinfo
Garming Sam [Mon, 23 Dec 2013 04:12:39 +0000 (17:12 +1300)]
selftest: add rodc and other env tests for wbinfo

Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Dec 23 17:17:39 CET 2013 on sn-devel-104

10 years agoselftest: add new credential change test
Garming Sam [Mon, 2 Dec 2013 00:20:39 +0000 (13:20 +1300)]
selftest: add new credential change test

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:rpcclient: close the connection if setting up the netlogon secure channel fails
Stefan Metzmacher [Fri, 29 Nov 2013 07:45:38 +0000 (08:45 +0100)]
s3:rpcclient: close the connection if setting up the netlogon secure channel fails

This is based on a patch from  Garming Sam <garming@catalyst.net.nz>.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: add new rpc client test
Garming Sam [Fri, 29 Nov 2013 03:51:08 +0000 (16:51 +1300)]
selftest: add new rpc client test

Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3:rpc_server: use make_session_info_guest() directly
Stefan Metzmacher [Fri, 29 Nov 2013 08:46:01 +0000 (09:46 +0100)]
s3:rpc_server: use make_session_info_guest() directly

This removes the useless static auth_anonymous_session_info() wrapper.

auth_anonymous_session_info() is also a public function in source4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibgpo: remove unused process_group_policy2 callback from CSE module API.
Günther Deschner [Mon, 16 Dec 2013 13:59:00 +0000 (14:59 +0100)]
libgpo: remove unused process_group_policy2 callback from CSE module API.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Dec 18 16:45:20 CET 2013 on sn-devel-104

10 years agolibgpo: remove some unnecessary usage of ADS_STATUS.
Günther Deschner [Fri, 13 Dec 2013 14:02:13 +0000 (15:02 +0100)]
libgpo: remove some unnecessary usage of ADS_STATUS.

Use NTSTATUS instead.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: remove unrequired references to ads_struct.
Günther Deschner [Fri, 13 Dec 2013 14:54:42 +0000 (15:54 +0100)]
libgpo: remove unrequired references to ads_struct.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: clean up CSE api, remove unrequired references to ads_struct.
Günther Deschner [Fri, 13 Dec 2013 14:54:10 +0000 (15:54 +0100)]
libgpo: clean up CSE api, remove unrequired references to ads_struct.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: clean up CSE module api, remove unrequired references to ads_struct.
Günther Deschner [Fri, 13 Dec 2013 14:52:31 +0000 (15:52 +0100)]
libgpo: clean up CSE module api, remove unrequired references to ads_struct.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: support probing for parameters in gp_inifile_get functions.
Günther Deschner [Thu, 12 Dec 2013 17:24:47 +0000 (18:24 +0100)]
libgpo: support probing for parameters in gp_inifile_get functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: check for talloc failures in ini file parsing routines.
Günther Deschner [Thu, 12 Dec 2013 17:23:47 +0000 (18:23 +0100)]
libgpo: check for talloc failures in ini file parsing routines.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agovfs_glusterfs: Enable per client log file
Poornima Gurusiddaiah [Fri, 22 Nov 2013 05:04:11 +0000 (05:04 +0000)]
vfs_glusterfs: Enable per client log file

In Samba configuration file, one of the options of gluster type is
log file, the value of this option was not allowed to contain any
variables, as a result all the clients would have a single log file,
which complicated debugging.
In this patch, variable substitution is performed for gluster log file.
Hence allowing user to customise the gluster log file name.

Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 17 23:44:16 CET 2013 on sn-devel-104

10 years agoctdb/eventscripts: Do not reconfigure in "monitor" events
Martin Schwenke [Mon, 9 Dec 2013 04:54:52 +0000 (15:54 +1100)]
ctdb/eventscripts: Do not reconfigure in "monitor" events

"monitor" events can be cancelled.  If a reconfigure action does a
service restart then the "monitor" event can be cancelled at the
inconvenient moment after the service is stopped.  In this case the
service stays down and the node may become unhealthy (depending on
whether there are any repair actions in the monitor event).

A long time ago we did service reconfiguration in "monitor" events
following failovers.  Service reconfiguration was then moved to the
"ipreallocated" event.  However, reconfiguration in "monitor" events
has been kept as a last resort in case an "ipreallocate" event does
not occur.  The only important case that this covers is "ctdb
deleteip", where "releaseip" events are generated without a
corresponding "ipreallocated".  Therefore, IPs can be deleted without
running the required service reconfiguration.

The supported way of removing IP addresses is now via "ctdb
reloadips", which always causes a takeover run with a corresponding
"ipreallocate" event.

This means that service reconfiguration in "monitor" events is no
longer required and should be removed because it is unsafe.

Also update the associated tests.  Make the first confirm that the
monitor event no longer does reconfiguration.  Change the others to
test that monitor status is correctly replayed when something else is
doing a reconfigure and currently holds the reconfigure lock.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Dec 17 06:32:35 CET 2013 on sn-devel-104

10 years agoshare_ldb: Fix a memleak
Volker Lendecke [Sun, 15 Dec 2013 20:28:08 +0000 (21:28 +0100)]
share_ldb: Fix a memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 17 03:50:58 CET 2013 on sn-devel-104

10 years agoshare_ldb: Fix CID 1138336 Dereference null return value
Volker Lendecke [Sun, 15 Dec 2013 20:28:08 +0000 (21:28 +0100)]
share_ldb: Fix CID 1138336 Dereference null return value

False positive, but this way we avoid another strchr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoshare_ldb: Fix a memleak
Volker Lendecke [Sun, 15 Dec 2013 20:29:59 +0000 (21:29 +0100)]
share_ldb: Fix a memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoshare_ldb: Fix CID 1138337 Dereference null return value
Volker Lendecke [Sun, 15 Dec 2013 20:28:08 +0000 (21:28 +0100)]
share_ldb: Fix CID 1138337 Dereference null return value

False positive, but this way we avoid another strchr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoldb: Fix 1138330 Dereference null return value
Volker Lendecke [Sun, 15 Dec 2013 20:23:59 +0000 (21:23 +0100)]
ldb: Fix 1138330 Dereference null return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbd: Fix CID 1138328 Logically dead code
Volker Lendecke [Sun, 15 Dec 2013 20:18:07 +0000 (21:18 +0100)]
smbd: Fix CID 1138328 Logically dead code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoscannedonly: Fix CID 242109 Unchecked return value from library
Volker Lendecke [Sun, 15 Dec 2013 20:07:00 +0000 (21:07 +0100)]
scannedonly: Fix CID 242109 Unchecked return value from library

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agontvfs: Fix CID 241291 Argument cannot be negative
Volker Lendecke [Sun, 15 Dec 2013 20:00:04 +0000 (21:00 +0100)]
ntvfs: Fix CID 241291 Argument cannot be negative

getgroups can return -1, which talloc_array won't be happy about

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotevent: Fix CID 1138326 Unchecked return value
Volker Lendecke [Sun, 15 Dec 2013 19:40:06 +0000 (20:40 +0100)]
tevent: Fix CID 1138326 Unchecked return value

For this case we explicitly have added tevent_req_oom

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoFix CID 1138340 Resource leak
Volker Lendecke [Sun, 15 Dec 2013 19:28:53 +0000 (20:28 +0100)]
Fix CID 1138340 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoFix CID 1138341 Resource leak
Volker Lendecke [Sun, 15 Dec 2013 19:28:04 +0000 (20:28 +0100)]
Fix CID 1138341 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotdb_util: Fix whitespace
Volker Lendecke [Sun, 15 Dec 2013 19:23:16 +0000 (20:23 +0100)]
tdb_util: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotdb_util: Fix CID 1138343 Uninitialized scalar variable
Volker Lendecke [Sun, 15 Dec 2013 19:22:36 +0000 (20:22 +0100)]
tdb_util: Fix CID 1138343 Uninitialized scalar variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3: Handle stat call with capability in vfs_gpfs
Abhidnya Joshi [Tue, 10 Dec 2013 10:01:43 +0000 (11:01 +0100)]
s3: Handle stat call with capability in vfs_gpfs

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Mon Dec 16 20:05:23 CET 2013 on sn-devel-104

10 years agos3: Add DAC_OVERRIDE capability support
Abhidnya Joshi [Tue, 10 Dec 2013 08:10:21 +0000 (09:10 +0100)]
s3: Add DAC_OVERRIDE capability support

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
10 years agogencache: Fix a type-punned warning
Volker Lendecke [Mon, 16 Dec 2013 11:42:46 +0000 (12:42 +0100)]
gencache: Fix a type-punned warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Dec 16 17:11:13 CET 2013 on sn-devel-104

10 years agos3: smbpasswd - fix crashes on invalid input.
Jeremy Allison [Thu, 12 Dec 2013 17:37:25 +0000 (09:37 -0800)]
s3: smbpasswd - fix crashes on invalid input.

get_pass can return NULL on error. Ensure that
this is always the case and fix all callers to cope
(some already did).

Reported by Joonas Kuorilehto <joneskoo@codenomicon.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10320

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Dec 16 15:17:58 CET 2013 on sn-devel-104

10 years agoauth_samba4: Describe the slightly unusual role of auth_samba4
Andrew Bartlett [Fri, 13 Dec 2013 00:38:29 +0000 (13:38 +1300)]
auth_samba4: Describe the slightly unusual role of auth_samba4

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Dec 16 03:18:00 CET 2013 on sn-devel-104

10 years agos3:smbd: avoid calling fd_is_readable() without async echo handler
Stefan Metzmacher [Wed, 11 Dec 2013 14:02:27 +0000 (15:02 +0100)]
s3:smbd: avoid calling fd_is_readable() without async echo handler

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Dec 14 20:19:10 CET 2013 on sn-devel-104

10 years agos3:lib: avoid talloc_zero_array() in poll_one_fd()
Stefan Metzmacher [Wed, 4 Dec 2013 22:31:10 +0000 (23:31 +0100)]
s3:lib: avoid talloc_zero_array() in poll_one_fd()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agos3:smbd: use PATH_MAX for the buffer passed to full_path_tos()
Stefan Metzmacher [Sat, 14 Dec 2013 09:45:42 +0000 (10:45 +0100)]
s3:smbd: use PATH_MAX for the buffer passed to full_path_tos()

We use this in other places too and it's better than a hardcoded value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotdb: Avoid reallocs for lockrecs
Volker Lendecke [Mon, 9 Dec 2013 09:56:33 +0000 (09:56 +0000)]
tdb: Avoid reallocs for lockrecs

In normal operations we have at most 3 entries in this array. Don't
bother with shrinking.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Dec 14 13:19:47 CET 2013 on sn-devel-104

10 years agosmbd: Early exit
Volker Lendecke [Fri, 6 Dec 2013 10:31:22 +0000 (10:31 +0000)]
smbd: Early exit

Yes, this also showed up in profiles

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Implement and use full_path_tos
Volker Lendecke [Fri, 6 Dec 2013 14:34:05 +0000 (14:34 +0000)]
smbd: Implement and use full_path_tos

Yes, this looks like a hack, but talloc_asprintf does show up high in
profiles called from these routines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Avoid pointless strcsequal calls
Volker Lendecke [Fri, 6 Dec 2013 12:10:37 +0000 (12:10 +0000)]
smbd: Avoid pointless strcsequal calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agodbwrap: No lock_order check if not required
Volker Lendecke [Fri, 6 Dec 2013 11:57:42 +0000 (11:57 +0000)]
dbwrap: No lock_order check if not required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agodbwrap_cache: Check negative first
Volker Lendecke [Sat, 7 Dec 2013 12:58:43 +0000 (12:58 +0000)]
dbwrap_cache: Check negative first

dbwrap_cache is right now used for notify most, and we hope to have very
few notifies around. So negative hits will be more likely than positive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agodbwrap_cache: Fix dbwrap_cache_validate
Volker Lendecke [Sat, 7 Dec 2013 12:58:07 +0000 (12:58 +0000)]
dbwrap_cache: Fix dbwrap_cache_validate

Classic brown paper bag bug :-(

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Simplify get_share_mode_lock a bit
Volker Lendecke [Fri, 6 Dec 2013 07:40:03 +0000 (07:40 +0000)]
smbd: Simplify get_share_mode_lock a bit

This does two things: It gets rid of a talloc_stackframe in a hot
code path and to me it makes the code easier to understand. It makes
the talloc hierarchy more obvious to follow.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agodbwrap: Avoid a stackframe in fetch_locked_internal
Volker Lendecke [Fri, 6 Dec 2013 11:38:12 +0000 (11:38 +0000)]
dbwrap: Avoid a stackframe in fetch_locked_internal

This shows in profiles. We call this so often that this is a pretty
hot code path.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoiconv: Use a static buffer in iconf not to spoil the talloc_pool
Volker Lendecke [Fri, 6 Dec 2013 10:31:07 +0000 (10:31 +0000)]
iconv: Use a static buffer in iconf not to spoil the talloc_pool

This is a buffer that is strictly used like a stack variable. This
patch makes it one and while there it fixes an error path memleak.
In the "pull_failed" case we did not talloc_free(cvtbuf). With
talloc_tos(), this does not really matter, but for code without
this it does.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Fix a false DEBUG fn name
Volker Lendecke [Sun, 8 Dec 2013 16:41:04 +0000 (16:41 +0000)]
smbd: Fix a false DEBUG fn name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotorture3: Do not depend on epoll
Volker Lendecke [Fri, 13 Dec 2013 13:55:45 +0000 (14:55 +0100)]
torture3: Do not depend on epoll

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosecacl: Slightly simplify make_sec_acl
Volker Lendecke [Fri, 6 Dec 2013 09:29:19 +0000 (09:29 +0000)]
secacl: Slightly simplify make_sec_acl

This avoids a complex if-expression

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec 14 00:10:21 CET 2013 on sn-devel-104

10 years agosecacl: Fix a memleak in an error path
Volker Lendecke [Fri, 6 Dec 2013 09:28:40 +0000 (09:28 +0000)]
secacl: Fix a memleak in an error path

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosecacl: Don't use talloc_zero
Volker Lendecke [Fri, 6 Dec 2013 09:26:25 +0000 (09:26 +0000)]
secacl: Don't use talloc_zero

We initialize all but one field anyway

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosecacl: Fix whitespace
Volker Lendecke [Fri, 6 Dec 2013 09:25:20 +0000 (09:25 +0000)]
secacl: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:rpc_server/lsa_lookup fix a compile warning
Christian Ambach [Tue, 10 Dec 2013 19:31:21 +0000 (20:31 +0100)]
s4:rpc_server/lsa_lookup fix a compile warning

about a set, but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 13 01:49:50 CET 2013 on sn-devel-104

10 years agos4:libcli fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:54:37 +0000 (17:54 +0100)]
s4:libcli fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:kdc fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:54:05 +0000 (17:54 +0100)]
s4:kdc fix compiler warnings

about set but unused variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:echo_server fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:53:49 +0000 (17:53 +0100)]
s4:echo_server fix compiler warnings

about set but unused variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:53:15 +0000 (17:53 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:30 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:winbindd fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:50:36 +0000 (17:50 +0100)]
s3:winbindd fix a compiler warning

about a potentially uninitialized variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd/smb2 fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:49:44 +0000 (17:49 +0100)]
s3:smbd/smb2 fix compiler warnings

about a potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:printing fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:49:18 +0000 (17:49 +0100)]
s3:printing fix a compiler warning

about a potentially uninitialized variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:48:59 +0000 (17:48 +0100)]
s3:libsmb fix a compiler warning

about a potentially uninitialized variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolibcli: fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:48:25 +0000 (17:48 +0100)]
libcli: fix compiler warnings

about missing prototypes

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/clap fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:47:50 +0000 (17:47 +0100)]
lib/clap fix compiler warnings

about set but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/tdb: fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:47:05 +0000 (17:47 +0100)]
lib/tdb: fix compiler warnings

about a variable shadowing a global declaration

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/ldb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:46:30 +0000 (17:46 +0100)]
lib/ldb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/ldb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:45:58 +0000 (17:45 +0100)]
lib/ldb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/ldb-samba: fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:45:14 +0000 (17:45 +0100)]
lib/ldb-samba: fix a compiler warning

about macro redefinition

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/compression: fix a compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:43:55 +0000 (17:43 +0100)]
lib/compression: fix a compiler warnings

about set but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agowaf docs: build the new vfs worm man page
Björn Baumbach [Wed, 20 Nov 2013 13:24:21 +0000 (14:24 +0100)]
waf docs: build the new vfs worm man page

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodocs-man: add manual page for the new worm vfs module
Björn Baumbach [Wed, 20 Nov 2013 12:00:04 +0000 (13:00 +0100)]
docs-man: add manual page for the new worm vfs module

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-waf: build new vfs_worm module
Volker Lendecke [Wed, 20 Nov 2013 11:11:41 +0000 (12:11 +0100)]
s3-waf: build new vfs_worm module

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-modules: add new vfs_worm module
Volker Lendecke [Wed, 20 Nov 2013 11:09:47 +0000 (12:09 +0100)]
s3-modules: add new vfs_worm module

VFS module to disallow writes for older files.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib-util: add functions to get elapsed from given timespec structs
Volker Lendecke [Wed, 20 Nov 2013 11:00:17 +0000 (12:00 +0100)]
lib-util: add functions to get elapsed from given timespec structs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodocs: Add kill-client-ip to smbcontrol manpage
Christof Schmitt [Fri, 6 Dec 2013 23:03:30 +0000 (16:03 -0700)]
docs: Add kill-client-ip to smbcontrol manpage

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Dec 12 20:45:44 CET 2013 on sn-devel-104

10 years agos3:utils/smbcontrol implement kill-client-ip in smbcontrol
Christian Ambach [Fri, 15 Mar 2013 14:09:18 +0000 (15:09 +0100)]
s3:utils/smbcontrol implement kill-client-ip in smbcontrol

allows the admin to forcefully shutdown the connection of a specified client by IP address

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smbd react on message that client should be disconnected
Christian Ambach [Fri, 15 Mar 2013 14:08:22 +0000 (15:08 +0100)]
s3:smbd react on message that client should be disconnected

if MSG_SMB_KILL_CLIENT_IP message comes in and our client has
the IP address given as argument, then shutdown the connection immediately

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:messaging add MSG_SMB_KILL_CLIENT_IP message
Christian Ambach [Fri, 15 Mar 2013 14:06:41 +0000 (15:06 +0100)]
s3:messaging add MSG_SMB_KILL_CLIENT_IP message

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoshadow_copy2: Fix some typos
David Keegel [Thu, 12 Dec 2013 11:08:58 +0000 (12:08 +0100)]
shadow_copy2: Fix some typos

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Dec 12 17:58:24 CET 2013 on sn-devel-104

10 years agolibgpo/security_CSE: more preamble header checks of SecEdit/GptTmpl.inf files.
Günther Deschner [Tue, 10 Dec 2013 23:59:55 +0000 (00:59 +0100)]
libgpo/security_CSE: more preamble header checks of SecEdit/GptTmpl.inf files.

$CHICAGO$ needs to be double quoted.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Dec 12 15:31:14 CET 2013 on sn-devel-104

10 years agolibgpo/security_CSE: fix unicode preamble check of SecEdit/GptTmpl.inf files.
Günther Deschner [Tue, 10 Dec 2013 23:50:03 +0000 (00:50 +0100)]
libgpo/security_CSE: fix unicode preamble check of SecEdit/GptTmpl.inf files.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: add gp_inifile_getbool().
Günther Deschner [Tue, 10 Dec 2013 23:44:49 +0000 (00:44 +0100)]
libgpo: add gp_inifile_getbool().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: fix segfault in gpo_process_gpo_list().
Günther Deschner [Tue, 10 Dec 2013 17:06:14 +0000 (18:06 +0100)]
libgpo: fix segfault in gpo_process_gpo_list().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: make sure we correctly can store the group policy state.
Günther Deschner [Tue, 10 Dec 2013 16:39:54 +0000 (17:39 +0100)]
libgpo: make sure we correctly can store the group policy state.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: remove use of deprecated talloc functions.
Günther Deschner [Tue, 10 Dec 2013 22:44:23 +0000 (23:44 +0100)]
libgpo: remove use of deprecated talloc functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: remove unused libgpo wscript_build.
Günther Deschner [Tue, 10 Dec 2013 22:18:17 +0000 (23:18 +0100)]
libgpo: remove unused libgpo wscript_build.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: use existing connection to the ds for the sysvol queries.
Günther Deschner [Tue, 10 Dec 2013 21:50:47 +0000 (22:50 +0100)]
libgpo: use existing connection to the ds for the sysvol queries.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibgpo: remove unused loadparm_context from functions.
Günther Deschner [Tue, 10 Dec 2013 17:26:51 +0000 (18:26 +0100)]
libgpo: remove unused loadparm_context from functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>