[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre2-537-g5e2bbdc

Karolin Seeger kseeger at samba.org
Fri Apr 11 07:09:35 GMT 2008


The branch, v3-2-stable has been updated
       via  5e2bbdcb210dd2bb554539800e9da696f3306f54 (commit)
       via  03825a9c5e565d9a9e381d67754d02d75547fcc0 (commit)
       via  683866f410fd5862adbf563061ec0f7c8327c5db (commit)
       via  619d188a566ea46f5260021c0acd22807bcc02ee (commit)
       via  c98f0b612e61e574a1fa2cf569f04a7399e7b5cb (commit)
       via  0997db65f50764292b69969a3725705e85c34f8d (commit)
       via  29a6dd1ea5f9d212b2a9e1391bdce12691c26605 (commit)
       via  0935e141720d962384bdf7aab80adcff876c7786 (commit)
       via  2edc7f5d12b4b2fdf2e2745c455a1c887a5e8a9e (commit)
       via  366b95c0cbf814fbc291a5b3c9665ae558f2563c (commit)
       via  dca165751d125264d61ac0b97d2330544bde3b76 (commit)
       via  130e5f8cfa267026711b62b7290e250c62ed0fa0 (commit)
       via  85adc99b8aaf5f83b35a75c27ce2eabbda32d664 (commit)
       via  7831768124e2ada5c89888cdcacd17d87e232699 (commit)
       via  6d3399d0b9764f6974c57e1bfd32945f92f8016e (commit)
       via  d2a198b0963de32faff63a8a60894da3d0a4655c (commit)
       via  9aae056f422f4e5a6c453068b659b280ec88def1 (commit)
       via  180c2ed01518d16419398ab58f8d454c8a932e25 (commit)
       via  4a9f573ade6c6662686010835aa892cc55465783 (commit)
       via  8f8387e90e8935e058ba1649eec4e95e289adcb2 (commit)
       via  ee14aefc9a9251112f63a33d939d7237ccc611a1 (commit)
       via  d69f22c2ba9c50407ea46de13ce1f47539ec7ba3 (commit)
       via  a130fbf4b5d8f5900f0b4365d6e0b94852ccc805 (commit)
       via  787140f9b5b16965261916230f5c5b5a21f8d211 (commit)
       via  c30e9e38c97353c82ad0da1da4afbfed0dc1a4ba (commit)
       via  d1589c3c98543174ef3db2415e657a624bd2212e (commit)
       via  14e4eb9efb62daaadea6ee18c6424eb8bd7280a7 (commit)
       via  9e1ca65853ed44579f6e24aa8ede8d68d38baaf4 (commit)
       via  9313ed8392e3475e347f3069202f6314c623305c (commit)
       via  4fa92317425e2a5ab5fa6889302aca06de97b602 (commit)
       via  9ea235b34e98ac7b1696257795fc2ccb75ba40a1 (commit)
       via  023274d1bdaefae59c02879720e1aaf2d66e79d8 (commit)
       via  a1c4bec110f539b51558489687a9591440988468 (commit)
       via  8ff02b2314f112d978e582f28581dce093a9a138 (commit)
       via  90bf7f09c8319490315d6f43190af81f9ebece10 (commit)
       via  adca698076e1c38eaff4e14cbd3a6bbfc639d135 (commit)
       via  3d8b3aa28a713c695a5d66c10dd700fd584fae96 (commit)
       via  dc3589deb43d530ecbc5889165bc2744d6cd173c (commit)
       via  1ba2f523d46577a551acfbc8e67bdb5d65012c02 (commit)
       via  2214cad4bd3c3aaf0ca929486574bded6339f887 (commit)
       via  58d84d93c54a9abd6b19e460dbd6560f19f4c37b (commit)
       via  7389fedc8c8a9a121d9c0790c3dbf2cdd9d6b561 (commit)
       via  bdce415c0453fb2492c21e2365ebe22549c46ffd (commit)
       via  ed18f87a55c6ae2e17f935542cb8be1683abb018 (commit)
       via  f17bbe46d16a82bdae9293505e23b2b9ff40df28 (commit)
       via  d6d688ab5574fd4c66ca8709ca5b7b6e019bf42e (commit)
       via  a44a078b57e553b3b74b029893b75d50f48b20b1 (commit)
       via  06efb857fc99ed1ed97b007463b8ce242e415d21 (commit)
       via  78eefedde14717e3a046c74689e7f235c5452092 (commit)
       via  ac7bc9964894e209a38f49b6a581afcf05775cf4 (commit)
       via  6a283effd8fc1617c61a309dd9fd2f70ae97abb5 (commit)
       via  cf3f8c2209f1b400240093e71213add7d15ab8ed (commit)
       via  a05c24df2d714d17309e684749fd1c607f2e92d0 (commit)
       via  79a2aeac008e6e2d751743ade6a275055ebf83b7 (commit)
       via  2332aac83d0442a3099973906929751596ad7d30 (commit)
       via  41e47a027e21b52cc77533bf7bcae578e0fffaf4 (commit)
       via  fdefa62017b9c562f7841bc80758f3dbaeeb41f6 (commit)
       via  0cfaa9555faf13fe2a88903dd97e1b81d2b81c85 (commit)
       via  c815081b98062434b2a6d66b572c1faf5ca13150 (commit)
       via  6139a9e3eed92bcf2ea094cad69efbfdbcca4f8f (commit)
       via  e5e58adf93b76db959be446fc058a4f9c509838e (commit)
       via  5fa83f6fbfe1639b5df17c39ab254ca0def62480 (commit)
       via  21453f9bee32390a09a2c0d00e526a1ba154243f (commit)
       via  300c97c243ddd76a7ccc60e19897ae4e908d9f5f (commit)
       via  7d70d04ae2ee1bab01d127260fd283dcbcaddfa2 (commit)
       via  fabfba8645a1c38470265dc296f0253e76432443 (commit)
       via  c203494ae13806fce208958acda4cb267411ac2d (commit)
       via  36a1ae09bf46bb4ef01b597453284deb708128ba (commit)
      from  a4dd586b943b508590c5decdd0be3ef6973d2a30 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit 5e2bbdcb210dd2bb554539800e9da696f3306f54
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Mar 20 21:58:39 2008 +0100

    A level 25 setuserinfo does change the pwdlastset
    (cherry picked from commit f65cb5d4b51e2e7b9b16b73e47cd2a8d55d5d4b0)

commit 03825a9c5e565d9a9e381d67754d02d75547fcc0
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Mar 11 12:37:01 2008 -0700

    Fix S3 to pass the test_raw_oplock_exclusive3 test.
    Jeremy.
    (cherry picked from commit 028302fac53083d66c969b876db1d831e53b8e35)

commit 683866f410fd5862adbf563061ec0f7c8327c5db
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 23:48:45 2008 +0200

    net conf: use talloc and talloc_strdup_lower throughout all net conf functions.
    
    Michael
    (cherry picked from commit 977cc9898970a0c07c30264e91754740c640e235)

commit 619d188a566ea46f5260021c0acd22807bcc02ee
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 23:24:52 2008 +0200

    net conf: implement "net conf delincludes".
    
    usage: "net conf delincludes <servicename>"
    
    This is equivalent to "net conf setincludes <servicename>"
    (without further arguments).
    
    Michael
    (cherry picked from commit a1d09f34ec39b614d738c6f795fe8eafaf634105)

commit c98f0b612e61e574a1fa2cf569f04a7399e7b5cb
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 18:46:38 2008 +0200

    net conf: implement a "net conf setincludes" command.
    
    given zero or more filenames as command line parameters
    
    Michael
    (cherry picked from commit ab51e4d44c3dcd00697c8ffb2ce628c4072c7a53)

commit 0997db65f50764292b69969a3725705e85c34f8d
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 15:37:33 2008 +0200

    net conf: implement "net conf getincludes".
    
    Michael
    (cherry picked from commit 30bc48623cf4f9ee17ff9c3e7a9fd98840a01d92)

commit 29a6dd1ea5f9d212b2a9e1391bdce12691c26605
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 15:17:28 2008 +0200

    net conf: add diagnostic message for failure to load text file.
    
    Michael
    (cherry picked from commit 8f2c3efa679d44acc900fb90f03319e830a7dcf4)

commit 0935e141720d962384bdf7aab80adcff876c7786
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 14:59:05 2008 +0200

    net conf: reduce indentation by grouping testmode code together.
    
    Michael
    (cherry picked from commit 97f9cb857532328999589062ceb0b229bcaf93a3)

commit 2edc7f5d12b4b2fdf2e2745c455a1c887a5e8a9e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 01:27:30 2008 +0200

    net conf: don't drop config in testmode
    
    Michael
    (cherry picked from commit 74e87b977514df79e49613a0b1c5157469b3cb93)

commit 366b95c0cbf814fbc291a5b3c9665ae558f2563c
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 01:20:36 2008 +0200

    net conf: fix import to correctly add includes (at the end)
    
    Michael
    (cherry picked from commit 3e81db83707e30ad46a565c9a118e7293b6cdf50)

commit dca165751d125264d61ac0b97d2330544bde3b76
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 18:54:20 2008 +0200

    net: don't process net_registry_util.c with make proto
    
    it has its own herader net_registry_util.h
    
    Michael
    (cherry picked from commit 51026d64b3e19626b51bee73fb257a75a6455355)

commit 130e5f8cfa267026711b62b7290e250c62ed0fa0
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 01:28:43 2008 +0200

    loadparm: drop debug level in map_parameter from 0 to 1
    
    we don't want to see this all the times in tests.
    
    Michael
    (cherry picked from commit fd43a4a1e05a2d259dc75bdcb4c0a3d9d8b41739)

commit 85adc99b8aaf5f83b35a75c27ce2eabbda32d664
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 12:08:18 2008 +0200

    test: run smbconftort testsuite from the local_s3 tests
    
    Michael
    (cherry picked from commit 6641061f76d2175b9476a96d24b99a52163936ca)

commit 7831768124e2ada5c89888cdcacd17d87e232699
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 22:23:12 2008 +0200

    libsmbconf: testsuite: add test for delete_includes
    
    Michael
    (cherry picked from commit 757601ec830f4a08c5fdcbe2d9bfac86fdc6602c)

commit 6d3399d0b9764f6974c57e1bfd32945f92f8016e
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 22:22:20 2008 +0200

    libsmbconf: return success and count 0 from get_includes when no includes present.
    
    Michael
    (cherry picked from commit 182433be5bae753d264491a3ec97433e2e316d10)

commit d2a198b0963de32faff63a8a60894da3d0a4655c
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 22:21:15 2008 +0200

    libsmbconf: add delete_includes mehtod to the api (and backend implementations)
    
    Michael
    (cherry picked from commit daef50e54d58a6684b6a890ebf523ca6245f0290)

commit 9aae056f422f4e5a6c453068b659b280ec88def1
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 18:46:02 2008 +0200

    libsmbconf: let set_includes delete the includes paramter when given an empty list
    
    instead of complaining
    
    Michael
    (cherry picked from commit 0dc1fd68598529891429fb29ab1f561fb434bf38)

commit 180c2ed01518d16419398ab58f8d454c8a932e25
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 15:16:45 2008 +0200

    libsmbconf: fix crashbug - correctly check for existence of file.
    
    Michael
    (cherry picked from commit dd543cd30c3eca9621681ba4b6e9a6683ef2bd07)

commit 4a9f573ade6c6662686010835aa892cc55465783
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 09:54:17 2008 +0200

    libsmbconf: prevent getting/deleting value "includes".
    
    This has to be handled differently (by using get_includes / set_includes)
    
    Michael
    (cherry picked from commit 5a880c6a2f2415220557a76a9b4ce9a17c766819)

commit 8f8387e90e8935e058ba1649eec4e95e289adcb2
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 01:19:50 2008 +0200

    libsmbconf: consider "include" a forbidden parameter in regisry config again.
    
    It is now taken care of by the special includes handling.
    
    Michael
    (cherry picked from commit 2c8c65d6900086e92c838333b31abf9efdb61343)

commit ee14aefc9a9251112f63a33d939d7237ccc611a1
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 00:47:27 2008 +0200

    libsmbconf: add includes at the end of parameter list in reg_get_share().
    
    Michael
    (cherry picked from commit 9bd06d5737aff2bb27c07575285e079fd561a566)

commit d69f22c2ba9c50407ea46de13ce1f47539ec7ba3
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 00:05:45 2008 +0200

    libsmbconf: add function smbconf_reg_valname_valid() and use it in get_values()
    
    so "includes" doesn't get listed as a parameter
    
    Michael
    (cherry picked from commit 01c4bd07305b4ce800b99a098652623f118a74aa)

commit a130fbf4b5d8f5900f0b4365d6e0b94852ccc805
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 23:58:56 2008 +0200

    libsmbconf: refactor get_includes on opened key into smbconf_reg_get_includes_internal()
    
    Michael
    (cherry picked from commit 072a3228a4e08894c67ad2983bcea3417e202773)

commit 787140f9b5b16965261916230f5c5b5a21f8d211
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 22:57:48 2008 +0200

    libsmbconf: rename registry_smbconf_valname_forbidden() to smbconf_reg_valname_forbidden()
    
    Michael
    (cherry picked from commit 23fb33fd33a8287d8691a1a5e95bf160be3ed25c)

commit c30e9e38c97353c82ad0da1da4afbfed0dc1a4ba
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 22:56:06 2008 +0200

    libsmbconf: make registry_smbconf_valname_forbidden() static
    
    Michael
    (cherry picked from commit 798808174d0d4cae3a746e26a253cad1a3177684)

commit d1589c3c98543174ef3db2415e657a624bd2212e
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 22:51:02 2008 +0200

    libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend
    
    from util_reg.c - no other callers left
    
    Michael
    (cherry picked from commit 98151fd3e1c24e5c8aaf3f5132071e91ac6ef257)

commit 14e4eb9efb62daaadea6ee18c6424eb8bd7280a7
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 22:23:57 2008 +0200

    libsmbconf: more sanely print multi_sz values in registry backend
    
    Michael
    (cherry picked from commit 382c623948abd1c6a5cf8ab7ee2be784fcef76ee)

commit 9e1ca65853ed44579f6e24aa8ede8d68d38baaf4
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 18:00:27 2008 +0200

    libsmbconf: testsuite: fix handling of error message/overall status
    
    Michael
    (cherry picked from commit c2d3d56d628f266fdfc0ca98fc199afc01670c2c)

commit 9313ed8392e3475e347f3069202f6314c623305c
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:54:29 2008 +0200

    libsmbconf: testsuite: add test_set_get_includes() and use it in registry test
    
    Michael
    (cherry picked from commit 1f64a1b2b4f11b44e9c9584480f01cac066a6a1d)

commit 4fa92317425e2a5ab5fa6889302aca06de97b602
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:49:10 2008 +0200

    libsmbconf: testsuite: refactor printing of string lists out.
    
    Michael
    (cherry picked from commit 828c7297247a557ed8e2b6935bbc819aae95a660)

commit 9ea235b34e98ac7b1696257795fc2ccb75ba40a1
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:46:36 2008 +0200

    libsmbconf: implement get_includes() and set_includes() for registry backend.
    
    includes are stored per share in a special registry value "includes"
    of type multi_sz.
    
    Michael
    (cherry picked from commit 3fee0d79cc618adc7dd82cfeff62c72ef061017b)

commit 023274d1bdaefae59c02879720e1aaf2d66e79d8
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 14:31:16 2008 +0200

    libsmbconf: testsuite: test get_includes for registry backend
    
    Michael
    (cherry picked from commit 31e68cbe5bdc8d69b2b711ec8ea62dbe612ec68f)

commit a1c4bec110f539b51558489687a9591440988468
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 14:30:46 2008 +0200

    libsmbconf: testsuite: use the get_global_includes in get_includes test.
    
    Michael
    (cherry picked from commit 2a4b71b105616b42e1bbfbf01126cc445a991cc0)

commit 8ff02b2314f112d978e582f28581dce093a9a138
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 14:24:42 2008 +0200

    libsmbconf: add "_global_" wrappers for get/set_includes.
    
    These use the usual global_check like the other global wrappers.
    
    Michael
    (cherry picked from commit ce1b2f550860cb3a566db09f7c7eac39c195a5b7)

commit 90bf7f09c8319490315d6f43190af81f9ebece10
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 12:30:21 2008 +0200

    libsmbconf: testsuite: add test for "get_includes" and use it in the text backend test.
    
    Michael
    (cherry picked from commit 1ca5afe58cef8b750a65bd8c2a5c9ee794ed50ba)

commit adca698076e1c38eaff4e14cbd3a6bbfc639d135
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 12:09:24 2008 +0200

    libsmbconf: fill get_includes() in text backed to retrieve includes from cache.
    
    Michael
    (cherry picked from commit 5e253e10b7f80af1f5a855c8e0f00846853cced1)

commit 3d8b3aa28a713c695a5d66c10dd700fd584fae96
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:53:45 2008 +0200

    libsmbconf: testsuite: set the debufg fd to stderr.
    
    ...so that we see some debug output
    
    Michael
    (cherry picked from commit 7cfec55ed48644f922ca0ffaa171e3512c93a360)

commit dc3589deb43d530ecbc5889165bc2744d6cd173c
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:52:46 2008 +0200

    libsmbconf: testsuite: use POPT_COMMON_SAMBA instead of POPT_COMMON_CONFIGFILE
    
    so we can for instance set the debug level on the command line.
    
    Michael
    (cherry picked from commit 94a19234620fc23db9c4aaf449e948342164d1d4)

commit 1ba2f523d46577a551acfbc8e67bdb5d65012c02
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:51:57 2008 +0200

    libsmbconf: testsuite: add talloc_stackframe to main().
    
    Michael
    (cherry picked from commit 8c631ac2f42e984137972b7388add4bcbc199665)

commit 2214cad4bd3c3aaf0ca929486574bded6339f887
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 12:07:35 2008 +0200

    libsmbconf: testsuite: add support for "--configfile" option.
    
    Michael
    (cherry picked from commit 9f6c909f465df5fc64e2bec88acf272be9cd574e)

commit 58d84d93c54a9abd6b19e460dbd6560f19f4c37b
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 11:02:17 2008 +0200

    libsmbconf: add testsuite to the library.
    
    Currently only the init function is tested, more tests to come...
    
    Michael
    (cherry picked from commit bc8dc8626c5fb296edbd193a7cc293317c7a29ca)

commit 7389fedc8c8a9a121d9c0790c3dbf2cdd9d6b561
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 10:16:03 2008 +0200

    libsmbconf: add talloc context to the get_includes methods.
    
    Michael
    (cherry picked from commit ed535b6b30b5c9412803f6373eadc704de6de2f9)

commit bdce415c0453fb2492c21e2365ebe22549c46ffd
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 01:56:32 2008 +0200

    libsmbconf: add get_includes() and set_includes() to the API.
    
    Includes have to get a special treatment, at least for registry.
    Includes are not like other smbconf parameters: they are some kind
    of metainformation. "include" has two effects when stated twice so
    it can not be stored boldly into registry, since there can only be
    one value named "include" in registry per key.
    
    I will provide special handling for includes for the registry backend.
    
    This patch provides the necessary methods in the smbconf API.
    
    Michael
    (cherry picked from commit e86eb375d9f83f73aeea0a16c8b43e2ef21a6e20)

commit ed18f87a55c6ae2e17f935542cb8be1683abb018
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 22:49:11 2008 +0200

    libsmbconf: activate the verbatim-flag in text backend: store parameters as they come.
    
    with verbatim == true, parameters are stored as they come from the input file,
    duplicates are listed multiple times, etc.
    
    Michael
    (cherry picked from commit c65575f831e9929ef7e66f2c7bfeed50f135b4b2)

commit f17bbe46d16a82bdae9293505e23b2b9ff40df28
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 22:43:33 2008 +0200

    libsmbconf: pass txt_private_data instead of only cache to do_parameter/section
    
    in preparation of using the verbatim flag.
    
    Michael
    (cherry picked from commit c68cd2477c65d5521a713ae0f37cf2994d2c339e)

commit d6d688ab5574fd4c66ca8709ca5b7b6e019bf42e
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 23:28:48 2008 +0200

    libsmbconf: load file after special initialization
    
    otherwise verbatim parameter can have no effect.
    
    Michael
    (cherry picked from commit 2ff0b693d7fc7e130a2fb14c06ae8bc28f4b5c57)

commit a44a078b57e553b3b74b029893b75d50f48b20b1
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 22:33:01 2008 +0200

    libsmbconf: add a "verbatim" parameter to smbconf_init_txt_simple().
    
    Michael
    (cherry picked from commit b9e72b402de412c23702715ead96c20e9b3248cc)

commit 06efb857fc99ed1ed97b007463b8ce242e415d21
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:29:11 2008 +0200

    libsmbconf: reformat smbconf_format_registry_value() - indentations/tabs
    
    Michael
    (cherry picked from commit b79a33eb2f370b8d8b50ed5ed2a0acc83e711c1e)

commit 78eefedde14717e3a046c74689e7f235c5452092
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:15:57 2008 +0200

    libsmbconf: untangle assignment and test in for-loop condition.
    
    Michael
    (cherry picked from commit 4339caff09e1277ae33d3810043bcb3f4e7c4e45)

commit ac7bc9964894e209a38f49b6a581afcf05775cf4
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:12:44 2008 +0200

    libsmbconf: fix a comment
    
    Michael
    (cherry picked from commit bc1a5bdbd3b7da1f85c952579096b3c8dc407572)

commit 6a283effd8fc1617c61a309dd9fd2f70ae97abb5
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 00:08:41 2008 +0200

    libsmbconf: search from the back when getting parameter from text backend
    
    so we make sure to always deliver the value last read.
    
    Michael
    (cherry picked from commit 2eb5a681e9e3ff302b5151f25d6856834eae7d54)

commit cf3f8c2209f1b400240093e71213add7d15ab8ed
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 00:03:39 2008 +0200

    libsmbconf: add smbconf_reverse_find_in_array() to find last occurence of a string.
    
    Michael
    (cherry picked from commit 25e0fd84780f4acb80cac3b5f54f9597e0e2f53e)

commit a05c24df2d714d17309e684749fd1c607f2e92d0
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:09:28 2008 +0200

    libsmbconf: move smbconf_find_in_array() to smbconf_util.c
    
    Michael
    (cherry picked from commit 7af79e60a3060083eae67bd053837c955b3f5c10)

commit 79a2aeac008e6e2d751743ade6a275055ebf83b7
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:06:41 2008 +0200

    libsmbconf: reorder prototypes in smbconf_private.h
    
    Michael
    (cherry picked from commit 0e932a0981ef52ff9d236b887eb8177304a99915)

commit 2332aac83d0442a3099973906929751596ad7d30
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:05:33 2008 +0200

    libsmbconf: rename smbconf_txt_find_in_array() to smbconf_find_in_array()
    
    Michael
    (cherry picked from commit 9890f437264c6acc8c61c430a53c4645e0a12959)

commit 41e47a027e21b52cc77533bf7bcae578e0fffaf4
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 7 15:01:44 2008 +0200

    libsmbconf: move utility functions from main module to new smbconf_util.c
    
    Michael
    (cherry picked from commit e0f6a9d50c9b72ec33d4323d1a6c5bdf44d011e7)

commit fdefa62017b9c562f7841bc80758f3dbaeeb41f6
Author: Michael Adam <obnox at samba.org>
Date:   Thu Apr 3 15:16:01 2008 +0200

    libsmbconf: move initialization of registry value down after error checks.
    
    Michael
    (cherry picked from commit 2a8029985f9bde4da8ca20bc24d937150eab444c)

commit 0cfaa9555faf13fe2a88903dd97e1b81d2b81c85
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 9 15:36:55 2008 +0200

    charcnv: add talloc_strdup_lower() - talloc variant of strdup_lower().
    
    Michael
    (cherry picked from commit 5f6c730cbeddd1ac2f515bd985c08ceb4ca9bc47)

commit c815081b98062434b2a6d66b572c1faf5ca13150
Author: Michael Adam <obnox at samba.org>
Date:   Thu Apr 10 00:44:25 2008 +0200

    vlp: fix an implicit cast compile warning.
    
    Michael
    (cherry picked from commit bf46f614c497110dcc3fc79f610fcc7a8784dbb2)

commit 6139a9e3eed92bcf2ea094cad69efbfdbcca4f8f
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 8 17:44:40 2008 +0200

    registry: add support for REG_MULTI_SZ to registry_push_value().
    
    This enables us to fetch multi_sz values from registry...
    
    Michael
    (cherry picked from commit a8cedfef27a0400c6aa05ddb5e51308ce0b789bd)

commit e5e58adf93b76db959be446fc058a4f9c509838e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Apr 3 15:29:25 2008 +0200

    registry: remove parameter checks from smbconf backend: they are in libsmbconf.
    
    Michael
    (cherry picked from commit 118cf3813336122a060916848e37d2d5d25bff92)

commit 5fa83f6fbfe1639b5df17c39ab254ca0def62480
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Apr 6 11:55:57 2008 +0200

    libwbclient: add wbcGetGroups()
    
    metze
    (cherry picked from commit 596d030b976102e7476a2460fce355914c4e8210)

commit 21453f9bee32390a09a2c0d00e526a1ba154243f
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Apr 6 11:27:36 2008 +0200

    wbcAllocateGid returns a gid_t, not a uid_t
    (cherry picked from commit 3130fb7b32285b8501f5ee8cbc62b478c09cccd3)

commit 300c97c243ddd76a7ccc60e19897ae4e908d9f5f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 28 16:52:18 2008 +0100

    libwbclient: add wbcInterfaceDetails()
    
    metze
    (cherry picked from commit fee3806326b9ba214e35868271e6481c0c8b9c4b)

commit 7d70d04ae2ee1bab01d127260fd283dcbcaddfa2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 31 12:01:24 2008 +0200

    libwbclient: use WBC_ERROR_IS_OK() in BAIL_ON_WBC_ERROR() macro
    
    metze
    (cherry picked from commit de2e8d5db93d32e5ebf04a2018a08f766eb9a233)

commit fabfba8645a1c38470265dc296f0253e76432443
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 24 21:07:01 2008 +0100

    libwbclient: remove prototype of non existing wbcDomainSequenceNumbers()
    
    metze
    (cherry picked from commit 7a4de23aa318bd24948e576a5582a5c74d335154)

commit c203494ae13806fce208958acda4cb267411ac2d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 24 20:31:37 2008 +0100

    libwbclient: add wbcListUsers() and wbcListGroups()
    
    metze
    (cherry picked from commit df127f0b40d36ea8ee605c24ea88558c7d40a7fe)

commit 36a1ae09bf46bb4ef01b597453284deb708128ba
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 21 10:18:54 2008 +0100

    libwbclient: add wbcLookupUserSids()
    
    metze
    (cherry picked from commit 38007a387a1f1b53877ef9ea518f83ecf026f4f3)

-----------------------------------------------------------------------

Summary of changes:
 source/Makefile.in                             |   36 +++-
 source/lib/charcnv.c                           |   26 ++
 source/lib/smbconf/smbconf.c                   |  166 ++++++-------
 source/lib/smbconf/smbconf.h                   |   18 ++-
 source/lib/smbconf/smbconf_private.h           |   19 ++-
 source/lib/smbconf/smbconf_reg.c               |  314 +++++++++++++++++++++---
 source/lib/smbconf/smbconf_txt_simple.c        |  166 +++++++++----
 source/lib/smbconf/smbconf_util.c              |  145 +++++++++++
 source/lib/smbconf/testsuite.c                 |  283 +++++++++++++++++++++
 source/lib/util_reg.c                          |   22 --
 source/lib/util_reg_api.c                      |   56 +++++
 source/nsswitch/libwbclient/wbc_err_internal.h |    9 +-
 source/nsswitch/libwbclient/wbc_idmap.c        |    2 +-
 source/nsswitch/libwbclient/wbc_pwd.c          |   60 +++++
 source/nsswitch/libwbclient/wbc_sid.c          |  224 +++++++++++++++++
 source/nsswitch/libwbclient/wbc_util.c         |   75 ++++++
 source/nsswitch/libwbclient/wbclient.h         |   36 +++-
 source/param/loadparm.c                        |    2 +-
 source/registry/reg_backend_smbconf.c          |  192 +--------------
 source/rpc_server/srv_samr_nt.c                |   28 ++-
 source/script/tests/test_local_s3.sh           |    3 +
 source/smbd/open.c                             |    5 +-
 source/smbd/trans2.c                           |    2 +-
 source/utils/net_conf.c                        |  271 ++++++++++++++++++---
 testsuite/printing/vlp.c                       |    3 +-
 25 files changed, 1728 insertions(+), 435 deletions(-)
 create mode 100644 source/lib/smbconf/smbconf_util.c
 create mode 100644 source/lib/smbconf/testsuite.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index b5bc696..b85319d 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -207,7 +207,8 @@ TORTURE_PROGS = bin/smbtorture at EXEEXT@ bin/msgtest at EXEEXT@ \
 	bin/masktest at EXEEXT@ bin/locktest at EXEEXT@ \
 	bin/locktest2 at EXEEXT@ bin/nsstest at EXEEXT@ bin/vfstest at EXEEXT@ \
 	bin/pdbtest at EXEEXT@ bin/talloctort at EXEEXT@ bin/replacetort at EXEEXT@ \
-	bin/tdbtorture at EXEEXT@
+	bin/tdbtorture at EXEEXT@ \
+	bin/smbconftort at EXEEXT@
 
 BIN_PROGS = @EXTRA_BIN_PROGS@ \
 	$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4) 
@@ -820,9 +821,22 @@ LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ1) $(LIBNET_OBJ) \
 		 $(SECRETS_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
 		 $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ)
 
-LIBSMBCONF_OBJ = lib/smbconf/smbconf.o lib/smbconf/smbconf_reg.o \
+LIBSMBCONF_OBJ = lib/smbconf/smbconf.o lib/smbconf/smbconf_util.o \
+		 lib/smbconf/smbconf_reg.o \
 		 lib/smbconf/smbconf_txt_simple.o
 
+SMBCONFTORT_OBJ0 = lib/smbconf/testsuite.o
+
+SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
+		  $(LIB_NONSMBD_OBJ) \
+		  $(PARAM_OBJ) \
+		  $(ERRORMAP_OBJ) \
+		  $(RPC_PARSE_OBJ1) \
+		  $(LIBSAMBA_OBJ) \
+		  $(DOSERR_OBJ) \
+		  $(SECRETS_OBJ) \
+		  $(POPT_LIB_OBJ)
+
 LIBNET_OBJ = libnet/libnet_join.o \
 	     librpc/gen_ndr/ndr_libnet_join.o
 
@@ -837,10 +851,14 @@ NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
 	   $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
 	   utils/net_conf.o \
 	   utils/net_registry.o \
-	   utils/net_registry_util.o \
 	   auth/token_util.o utils/net_dom.o nsswitch/wb_client.o
 
-NET_OBJ = $(NET_OBJ1) $(PARAM_WITHOUT_REG_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
+# these are not processed by make proto
+NET_OBJ2 = utils/net_registry_util.o
+
+NET_OBJ = $(NET_OBJ1) \
+	  $(NET_OBJ2) \
+	  $(PARAM_WITHOUT_REG_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
 	  $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
 	  $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
 	  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
@@ -1139,6 +1157,8 @@ talloctort : SHOWFLAGS bin/talloctort at EXEEXT@
 
 replacetort : SHOWFLAGS bin/replacetort at EXEEXT@
 
+smbconftort : SHOWFLAGS bin/smbconftort at EXEEXT@
+
 timelimit : SHOWFLAGS bin/timelimit at EXEEXT@
 
 nsswitch : SHOWFLAGS bin/winbindd at EXEEXT@ bin/wbinfo at EXEEXT@ @WINBIND_NSS@ \
@@ -1164,7 +1184,7 @@ idl:
 #####################################################################
 
 
-everything: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort modules torture \
+everything: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
 	$(EVERYTHING_PROGS)
 
 .SUFFIXES:
@@ -1397,6 +1417,12 @@ bin/replacetort at EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
 	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
 		$(DYNEXP) $(LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@
 
+bin/smbconftort at EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
+	@echo Linking $@
+	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
+		$(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \
+		@LIBTALLOC_LIBS@ @LIBTDB_LIBS@
+
 bin/masktest at EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
 	@echo Linking $@
 	@$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index d11620e..69d1db0 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -945,6 +945,32 @@ char *strdup_lower(const char *s)
 	return out_buffer;
 }
 
+char *talloc_strdup_lower(TALLOC_CTX *ctx, const char *s)
+{
+	size_t size;
+	smb_ucs2_t *buffer = NULL;
+	char *out_buffer;
+
+	size = push_ucs2_talloc(ctx, &buffer, s);
+	if (size == -1 || !buffer) {
+		TALLOC_FREE(buffer);
+		return NULL;
+	}
+
+	strlower_w(buffer);
+
+	size = pull_ucs2_talloc(ctx, &out_buffer, buffer);
+	TALLOC_FREE(buffer);
+
+	if (size == (size_t)-1) {
+		TALLOC_FREE(out_buffer);
+		return NULL;
+	}
+
+	return out_buffer;
+}
+
+
 size_t ucs2_align(const void *base_ptr, const void *p, int flags)
 {
 	if (flags & (STR_NOALIGN|STR_ASCII))
diff --git a/source/lib/smbconf/smbconf.c b/source/lib/smbconf/smbconf.c
index 4315dd9..541b163 100644
--- a/source/lib/smbconf/smbconf.c
+++ b/source/lib/smbconf/smbconf.c
@@ -1,6 +1,6 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  libnet smbconf registry Support
+ *  libsmbconf - Samba configuration library
  *  Copyright (C) Michael Adam 2007-2008
  *  Copyright (C) Guenther Deschner 2007
  *
@@ -27,11 +27,6 @@
  *
  **********************************************************************/
 
-static int smbconf_destroy_ctx(struct smbconf_ctx *ctx)
-{
-	return ctx->ops->shutdown(ctx);
-}
-
 static WERROR smbconf_global_check(struct smbconf_ctx *ctx)
 {
 	if (!smbconf_share_exists(ctx, GLOBAL_NAME)) {
@@ -43,89 +38,6 @@ static WERROR smbconf_global_check(struct smbconf_ctx *ctx)
 
 /**********************************************************************
  *
- * helper functions exported to the backend modules
- * (might go into a smbconf_util.c)
- *
- **********************************************************************/
-
-/**
- * add a string to a talloced array of strings.
- */
-WERROR smbconf_add_string_to_array(TALLOC_CTX *mem_ctx,
-				   char ***array,
-				   uint32_t count,
-				   const char *string)
-{
-	char **new_array = NULL;
-
-	if ((array == NULL) || (string == NULL)) {
-		return WERR_INVALID_PARAM;
-	}
-
-	new_array = TALLOC_REALLOC_ARRAY(mem_ctx, *array, char *, count + 1);
-	if (new_array == NULL) {
-		return WERR_NOMEM;
-	}
-
-	new_array[count] = talloc_strdup(new_array, string);
-	if (new_array[count] == NULL) {
-		TALLOC_FREE(new_array);
-		return WERR_NOMEM;
-	}
-
-	*array = new_array;
-
-	return WERR_OK;
-}
-
-/**
- * Initialize the configuration.
- *
- * This should be the first function in a sequence of calls to smbconf
- * functions:
- *
- * Upon success, this creates and returns the conf context
- * that should be passed around in subsequent calls to the other
- * smbconf functions.
- *
- * After the work with the configuration is completed, smbconf_shutdown()
- * should be called.
- */
-WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
-		    const char *path, struct smbconf_ops *ops)
-{
-	WERROR werr = WERR_OK;
-	struct smbconf_ctx *ctx;
-
-	if (conf_ctx == NULL) {
-		return WERR_INVALID_PARAM;
-	}
-
-	ctx = TALLOC_ZERO_P(mem_ctx, struct smbconf_ctx);
-	if (ctx == NULL) {
-		return WERR_NOMEM;
-	}
-
-	ctx->ops = ops;
-
-	werr = ctx->ops->init(ctx, path);
-	if (!W_ERROR_IS_OK(werr)) {
-		goto fail;
-	}
-
-	talloc_set_destructor(ctx, smbconf_destroy_ctx);
-
-	*conf_ctx = ctx;
-	return werr;
-
-fail:
-	TALLOC_FREE(ctx);
-	return werr;
-}
-
-
-/**********************************************************************
- *
  * The actual libsmbconf API functions that are exported.
  *
  **********************************************************************/
@@ -423,3 +335,79 @@ WERROR smbconf_delete_global_parameter(struct smbconf_ctx *ctx,
 
 	return werr;
 }
+
+WERROR smbconf_get_includes(struct smbconf_ctx *ctx,
+			    TALLOC_CTX *mem_ctx,
+			    const char *service,
+			    uint32_t *num_includes, char ***includes)
+{
+	if (!smbconf_share_exists(ctx, service)) {
+		return WERR_NO_SUCH_SERVICE;
+	}
+
+	return ctx->ops->get_includes(ctx, mem_ctx, service, num_includes,
+				      includes);
+}
+
+WERROR smbconf_get_global_includes(struct smbconf_ctx *ctx,
+				   TALLOC_CTX *mem_ctx,
+				   uint32_t *num_includes, char ***includes)
+{
+	WERROR werr;
+
+	werr = smbconf_global_check(ctx);
+	if (W_ERROR_IS_OK(werr)) {
+		werr = smbconf_get_includes(ctx, mem_ctx, GLOBAL_NAME,
+					    num_includes, includes);
+	}
+
+	return werr;
+}
+
+WERROR smbconf_set_includes(struct smbconf_ctx *ctx,
+			    const char *service,
+			    uint32_t num_includes, const char **includes)
+{
+	if (!smbconf_share_exists(ctx, service)) {
+		return WERR_NO_SUCH_SERVICE;
+	}
+
+	return ctx->ops->set_includes(ctx, service, num_includes, includes);
+}
+
+WERROR smbconf_set_global_includes(struct smbconf_ctx *ctx,
+				   uint32_t num_includes,
+				   const char **includes)
+{
+	WERROR werr;
+
+	werr = smbconf_global_check(ctx);
+	if (W_ERROR_IS_OK(werr)) {
+		werr = smbconf_set_includes(ctx, GLOBAL_NAME,
+					    num_includes, includes);
+	}
+
+	return werr;
+}
+
+
+WERROR smbconf_delete_includes(struct smbconf_ctx *ctx, const char *service)
+{
+	if (!smbconf_share_exists(ctx, service)) {
+		return WERR_NO_SUCH_SERVICE;
+	}
+
+	return ctx->ops->delete_includes(ctx, service);
+}
+
+WERROR smbconf_delete_global_includes(struct smbconf_ctx *ctx)
+{
+	WERROR werr;
+
+	werr = smbconf_global_check(ctx);
+	if (W_ERROR_IS_OK(werr)) {
+		werr = smbconf_delete_includes(ctx, GLOBAL_NAME);
+	}
+
+	return werr;
+}
diff --git a/source/lib/smbconf/smbconf.h b/source/lib/smbconf/smbconf.h
index 72729b9..ee7549a 100644
--- a/source/lib/smbconf/smbconf.h
+++ b/source/lib/smbconf/smbconf.h
@@ -40,7 +40,8 @@ WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
 
 WERROR smbconf_init_txt_simple(TALLOC_CTX *mem_ctx,
 			       struct smbconf_ctx **conf_ctx,
-			       const char *path);
+			       const char *path,
+			       bool verbatim);
 
 /*
  * the smbconf API functions
@@ -85,5 +86,20 @@ WERROR smbconf_delete_parameter(struct smbconf_ctx *ctx,
 				const char *service, const char *param);
 WERROR smbconf_delete_global_parameter(struct smbconf_ctx *ctx,
 				       const char *param);
+WERROR smbconf_get_includes(struct smbconf_ctx *ctx,
+			    TALLOC_CTX *mem_ctx,
+			    const char *service,
+			    uint32_t *num_includes, char ***includes);
+WERROR smbconf_get_global_includes(struct smbconf_ctx *ctx,
+				   TALLOC_CTX *mem_ctx,
+				   uint32_t *num_includes, char ***includes);
+WERROR smbconf_set_includes(struct smbconf_ctx *ctx,
+			    const char *service,
+			    uint32_t num_includes, const char **includes);
+WERROR smbconf_set_global_includes(struct smbconf_ctx *ctx,
+				   uint32_t num_includes,
+				   const char **includes);
+WERROR smbconf_delete_includes(struct smbconf_ctx *ctx, const char *service);
+WERROR smbconf_delete_global_includes(struct smbconf_ctx *ctx);
 
 #endif /*  _LIBSMBCONF_H_  */
diff --git a/source/lib/smbconf/smbconf_private.h b/source/lib/smbconf/smbconf_private.h
index e08a2b1..5acba5a 100644
--- a/source/lib/smbconf/smbconf_private.h
+++ b/source/lib/smbconf/smbconf_private.h
@@ -51,6 +51,15 @@ struct smbconf_ops {
 				char **valstr);
 	WERROR (*delete_parameter)(struct smbconf_ctx *ctx,
 				   const char *service, const char *param);
+	WERROR (*get_includes)(struct smbconf_ctx *ctx,
+			       TALLOC_CTX *mem_ctx,
+			       const char *service,
+			       uint32_t *num_includes, char ***includes);
+	WERROR (*set_includes)(struct smbconf_ctx *ctx,
+			       const char *service,
+			       uint32_t num_includes, const char **includes);
+	WERROR (*delete_includes)(struct smbconf_ctx *ctx,
+				  const char *service);
 };
 
 struct smbconf_ctx {
@@ -59,12 +68,18 @@ struct smbconf_ctx {
 	void *data; /* private data for use in backends */
 };
 
+WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
+		    const char *path, struct smbconf_ops *ops);
+
 WERROR smbconf_add_string_to_array(TALLOC_CTX *mem_ctx,
 				   char ***array,
 				   uint32_t count,
 				   const char *string);
 
-WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
-		    const char *path, struct smbconf_ops *ops);
+bool smbconf_find_in_array(const char *string, char **list,
+			   uint32_t num_entries, uint32_t *entry);
+
+bool smbconf_reverse_find_in_array(const char *string, char **list,
+				   uint32_t num_entries, uint32_t *entry);
 
 #endif
diff --git a/source/lib/smbconf/smbconf_reg.c b/source/lib/smbconf/smbconf_reg.c
index 77e6233..0ac49a7 100644
--- a/source/lib/smbconf/smbconf_reg.c
+++ b/source/lib/smbconf/smbconf_reg.c
@@ -20,6 +20,8 @@
 #include "includes.h"
 #include "smbconf_private.h"
 
+#define INCLUDES_VALNAME "includes"
+
 struct reg_private_data {
 	NT_USER_TOKEN *token;
 	bool open;		/* did _we_ open the registry? */
@@ -39,6 +41,35 @@ static struct reg_private_data *rpd(struct smbconf_ctx *ctx)
 	return (struct reg_private_data *)(ctx->data);
 }
 
+/*
+ * check whether a given value name is forbidden in registry (smbconf)
+ */
+static bool smbconf_reg_valname_forbidden(const char *valname)
+{
+	/* hard code the list of forbidden names here for now */
+	const char *forbidden_valnames[] = {
+		"lock directory",
+		"lock dir",
+		"config backend",
+		"include",
+		NULL
+	};
+	const char **forbidden = NULL;
+
+	for (forbidden = forbidden_valnames; *forbidden != NULL; forbidden++) {
+		if (strwicmp(valname, *forbidden) == 0) {
+			return true;
+		}
+	}
+	return false;
+}
+
+static bool smbconf_reg_valname_valid(const char *valname)
+{
+	return (lp_parameter_is_valid(valname) &&
+		!smbconf_reg_valname_forbidden(valname));
+}
+
 /**
  * Open a registry key specified by "path"
  */
@@ -220,13 +251,7 @@ static WERROR smbconf_reg_set_value(struct registry_key *key,
 		goto done;
 	}
 
-	ZERO_STRUCT(val);
-
-	val.type = REG_SZ;
-	val.v.sz.str = CONST_DISCARD(char *, canon_valstr);
-	val.v.sz.len = strlen(canon_valstr) + 1;
-
-	if (registry_smbconf_valname_forbidden(canon_valname)) {
+	if (smbconf_reg_valname_forbidden(canon_valname)) {
 		DEBUG(5, ("Parameter '%s' not allowed in registry.\n",
 			  canon_valname));
 		werr = WERR_INVALID_PARAM;
@@ -251,6 +276,12 @@ static WERROR smbconf_reg_set_value(struct registry_key *key,
 		goto done;
 	}
 
+	ZERO_STRUCT(val);
+
+	val.type = REG_SZ;
+	val.v.sz.str = CONST_DISCARD(char *, canon_valstr);
+	val.v.sz.len = strlen(canon_valstr) + 1;
+
 	werr = reg_setvalue(key, canon_valname, &val);
 	if (!W_ERROR_IS_OK(werr)) {
 		DEBUG(5, ("Error adding value '%s' to "
@@ -262,6 +293,51 @@ done:
 	return werr;
 }
 
+static WERROR smbconf_reg_set_multi_sz_value(struct registry_key *key,
+					     const char *valname,
+					     const uint32_t num_strings,
+					     const char **strings)
+{
+	WERROR werr;
+	struct registry_value *value;
+	uint32_t count;
+	TALLOC_CTX *tmp_ctx = talloc_stackframe();
+
+	if (strings == NULL) {
+		werr = WERR_INVALID_PARAM;
+		goto done;
+	}
+
+	value = TALLOC_ZERO_P(tmp_ctx, struct registry_value);
+
+	value->type = REG_MULTI_SZ;
+	value->v.multi_sz.num_strings = num_strings;
+	value->v.multi_sz.strings = TALLOC_ARRAY(tmp_ctx, char *, num_strings);
+	if (value->v.multi_sz.strings == NULL) {
+		werr = WERR_NOMEM;
+		goto done;
+	}
+	for (count = 0; count < num_strings; count++) {
+		value->v.multi_sz.strings[count] =


-- 
Samba Shared Repository


More information about the samba-cvs mailing list