[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0rc1-77-gfbfd169

Karolin Seeger kseeger at samba.org
Thu Dec 11 09:51:12 GMT 2008


The branch, v3-3-stable has been updated
       via  fbfd1697de4239162e7d6c3a8fbd48dd547843d6 (commit)
       via  342e4df77f834a28e0ffcbd04708750bd6b8c6a2 (commit)
       via  dc787ff4e3d00b9bee98d62f43f6abc032cf52b0 (commit)
       via  8512b4bde5a315dfccabbeb1a3938f4eace63336 (commit)
       via  b3f9799927cd03d40c63948185a071f50bb998e5 (commit)
       via  74dfed86a72715eb3ccbb82348c8b98820085c96 (commit)
       via  7c1c70d5ad0b03694d241f4a398176aaa3c41363 (commit)
       via  cc2d1f98d80771cf2941672b225099a7c20a0b26 (commit)
       via  b74098d773e0f17c86b0cf650a8c67f799a73914 (commit)
       via  95f7f388c54293c6ad5abeaf960db10c7ac0e6f1 (commit)
       via  4711cff492d66ffdee2004aee4097f805dc489bb (commit)
       via  a79d86b645949b1587bef34d51b891fc73cdf2c3 (commit)
       via  af6786b707ce936312cc629dd2a8821de8076b17 (commit)
       via  588bff8c28c474bf4f801778623805054f5f579c (commit)
       via  e7b59ba7e1078a5fed32700931eb98301ecba2d6 (commit)
       via  ef300361d2a6dccc15641b438eb4e14a09b90e19 (commit)
       via  40a5bfb16bfdd143a670b847935a704594d76604 (commit)
       via  3d02fbb69e4d8e9c158e40434f01f763518589f3 (commit)
       via  cc85a00fa574f29167d8e7c7821a158001194318 (commit)
       via  68276aa400cb126513de06ad227febe737ec11b6 (commit)
       via  70d181994f4920e02f608a9d5bdc60e28a42808b (commit)
       via  16bcd4d8bcffe80f30f30edef0b736ac9cacdf45 (commit)
       via  cebd64d5c9157b1b5c327f805d9f17759b8fe1bc (commit)
       via  29f2a6fd8aa91d585e96171475c6a44893e5d54b (commit)
       via  c0d3da886f05eca189192a1d18909371e724efc4 (commit)
       via  3b5fa68b730b9bcfce6201e795dbf37a4a092425 (commit)
       via  d4afae2d84a10d88af8efbe7638bc8c4e6534b1f (commit)
       via  6f455046a70215ec5b7e4e8cd83635ee4c82778e (commit)
       via  1955cd6174c9bc8446568bfa0dda0bd3b271c5bc (commit)
       via  fbefea349724116ff8f40ce5934ae5efedfe8fad (commit)
       via  2f17537668290e09e4e210a91bdafeac736b5f66 (commit)
       via  0a97e945b86a8e69fb7fa2349043fbefa8f66e15 (commit)
       via  ff7f2473b72c0bf09dca1c0b100b4ab21f645e9b (commit)
       via  3f5daae9c69495629bb4d68f2ba5b0e1c01bb540 (commit)
       via  a6eb790e3e4d80f03033241436e0d33744d07d08 (commit)
       via  a5c5330c92420651d9ef8beb96b0178b300fd307 (commit)
       via  6295161f4ff52f487573ddbae1162ca115f9e566 (commit)
       via  789384d58e8a282dd1a47ffc6ec65c838038e6b3 (commit)
       via  9ffcedb2eb580d67ae4890052a1013dfa89e26a2 (commit)
       via  b06868667a95ab52e1dce66d07a257068341e439 (commit)
       via  0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a (commit)
       via  9628a6a7c73a1bce2700768153a4cdc130690ae5 (commit)
       via  9ab9b7f45b966e304ff73c3701128c8c05b683a1 (commit)
       via  99d6fa2bc0dae189bf8f3ce91371083fa6d5e368 (commit)
       via  623c2bc3eb9a427ff976ec47f4a8a032b3ce84d4 (commit)
       via  de671a1e9d898a16a249920bdf9fde3fa21421f4 (commit)
       via  c882a547aa6ba539002f2e0b881de89c8e3424e9 (commit)
       via  38e4b96475e76d19e6b604630f1d9f390d23b5ba (commit)
       via  a9f98bf0402d81c484155cdb81444d697d51decb (commit)
       via  2bc75112bff80bad2bd954e2b1bee0965b36c585 (commit)
       via  07692605cceb47fddc130d63b8eb22e69936ba16 (commit)
       via  bc846e275f866ae1cb71293eb4303c2c6c62d4e9 (commit)
       via  e3f65d433eb9429a76930875fb8651a5b50fe78d (commit)
       via  852e4cda48c3e48a1dd9c75b65e8b27c0be05028 (commit)
       via  4f20c8d0c20e9f9a3576ba3d18a6e78d495c5b25 (commit)
       via  e3962e8cbc0a15ddbced49cfabb56f93497b8ac5 (commit)
       via  c4ad5061c8dc8a73dfd20a176e22093593fccbf4 (commit)
       via  37ab9e7884f769c70493dffff26861f1c52d124a (commit)
       via  2dc2e803c150de9f0b91caa7967a14d753cd2dfd (commit)
       via  ed4254d58cd67659792008aaf4a6949af7b03b51 (commit)
       via  056fa6464b92d1102d32a96d1ce03e594994ba54 (commit)
       via  5d71b64801769d4492501c3c5e226fac866083c7 (commit)
       via  5ea6a81f2a845b579568acd533750f783e65ba53 (commit)
       via  218b39b708535f3c2e60c24b073ff9676c28d1c8 (commit)
       via  b1a583adf7b49cfb4a7d301956093800b7022192 (commit)
       via  f5634d477e427617e8cdd6aab0554a5153d60bbc (commit)
       via  8cba79a33415e7f73d63e9b7ce5b2c8b0388685a (commit)
       via  48a7cec46c0b87b7f7966782fed06e318a75e8af (commit)
       via  ce79a1a84279202cabba9694b0d91e53f528fd33 (commit)
      from  4339dd53ca388c25cfb769666f9a7b09eb67ecc5 (commit)

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


- Log -----------------------------------------------------------------
commit fbfd1697de4239162e7d6c3a8fbd48dd547843d6
Author: Günther Deschner <gd at samba.org>
Date:   Tue Nov 18 17:06:53 2008 +0100

    s3: merge german pam_winbind message translations from master.
    
    Guenther
    (cherry picked from commit aa0ef2f97d98e7ca80636a4dc8093d2034d0dbf1)

commit 342e4df77f834a28e0ffcbd04708750bd6b8c6a2
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Dec 10 17:04:29 2008 -0800

    Make the LookupRid access check match LookupName until
    we know the correct bits to use here.
    Jeremy.
    (cherry picked from commit 11bd02bc8e1484a953632d3293db716da2647c04)

commit dc787ff4e3d00b9bee98d62f43f6abc032cf52b0
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Dec 10 15:20:06 2008 -0800

    Fix usrmgr opening a user object as non-root.
    Jeremy.
    (cherry picked from commit 6a4b0683e05ecc0bf57a1601c741582576f31b23)

commit 8512b4bde5a315dfccabbeb1a3938f4eace63336
Author: Tim Prouty <tprouty at samba.org>
Date:   Sat Dec 6 16:08:35 2008 -0800

    Fix a delete on close divergence from windows [2/2]
    
    This second patch cleans up by removing all of the code that is made
    obsolete by the first patch.  It should cause no functional changes.
    (cherry picked from commit c39c35f3e67a726c6464c1497e46fe7a2eb3dc77)

commit b3f9799927cd03d40c63948185a071f50bb998e5
Author: Tim Prouty <tprouty at samba.org>
Date:   Sun Dec 7 10:30:01 2008 -0800

    Fix a delete on close divergence from windows [1/2]
    
    smbtorture4's BASE-DELETE:deltest17 was failing against win2k8,
    win2k3, and winXPsp2 but passing against samba.
    
    deltest17 does the following:
    
    1. open file -> file is created
    2. closes file
    3. open file with DOC -> fnum1
    4. check that DOC is not reported as being set from fnum1
    5. opens file again Read Only -> fnum2
    6. check that DOC is not reported as being set from either file handle
    7. close fnum1 (the file handle that requested DOC to be set)
    8. check if DOC is reported as being set from fnum2
     * This is where windows and samba begin to diverge.  Windows
       reports that the DOC bit is set, while samba reports that it is not set.
    9. close fnum2 (the last remaining open handle for the file)
    10.See if the file has been deleted.
     * On samba the file still exists.  On windows the file was deleted.
    
    The way open_file_ntcreate is written now, if an open has the DOC bit
    set on the wire, DOC (fsp->initial_delete_on_close) is not set unless:
    a. the open creates the file, or b. there is an open file handle with
    a share_entry in the struct lck that has the
    SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE bit set (let's call it
    SM_AIDOC).
    
    My understanding of SM_AIDOC is that it was added to differentiate
    between DOC being set on an open that creates a file vs an open that
    opens an existing.  As described in step 8/10 above, it appears that
    windows does not make this differentiation.
    
    To resolve this issue there are two patches.  This first patch is a
    simple proof of concept change that is sufficient to fix the bug.  It
    removes the differentiation in open_file_ntcreate, and updates
    deltest17 to allow it to pass against win2k3/xp.  This makes
    open_file_ntcreate more closely match the semantics in open_directory
    and rename_internals_fsp.  This change also does not break any other
    tests in BASE-DELETE or "make test".  Specifically test deltest20b
    which verifies the CIFSFS rename DOC semantics still passes :).
    (cherry picked from commit 69a2b8ea06bf65109ed8a44df38e62bcbac7c4a9)

commit 74dfed86a72715eb3ccbb82348c8b98820085c96
Author: SATOH Fumiyasu <fumiyas at osstech.co.jp>
Date:   Tue Dec 9 14:25:46 2008 -0800

    Fix bug #5688 LPQ process is orphaned if socket address parameter is invalid
    (cherry picked from commit 7ef3e752bf56d130a242d6bb6e92fa76cae45fa0)

commit 7c1c70d5ad0b03694d241f4a398176aaa3c41363
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Dec 9 22:08:13 2008 +0100

    build-docs: Change to the right directory before calling 'make clean'.
    This fixes build-docs if it's called from the create-tarball script.
    
    Karolin
    (cherry picked from commit dd3ef73c8c184eaec7ee515ef2130f30f9e481b3)
    (cherry picked from commit 8dd3a7bfde16e85a9ee509cf6bcfc788062705a5)

commit cc2d1f98d80771cf2941672b225099a7c20a0b26
Author: Günther Deschner <gd at samba.org>
Date:   Tue Dec 9 17:28:15 2008 +0100

    s3-ldapsam: Fix Bug 5957: do not abort rename process on valid rename script.
    
    Guenther
    (cherry picked from commit 26139344fd0fac4fdd2a6752628b252fbd9b7450)
    (cherry picked from commit 866efa63a26f75bbf17cd4bebf639594e2feafba)

commit b74098d773e0f17c86b0cf650a8c67f799a73914
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Dec 8 12:23:17 2008 -0800

    Fix bug #5953 - smbclient crashes: cli_list_new segmentation fault.
    Karolin: must be in 3.3 final. Thanks,
    Jeremy.
    (cherry picked from commit e9cad95d8728ac81ca13b5dea16167ceb4e4cf50)

commit 95f7f388c54293c6ad5abeaf960db10c7ac0e6f1
Author: Dan Sledz <dsledz at isilon.com>
Date:   Fri Dec 5 17:29:38 2008 -0800

    Fix logging to syslog
    (cherry picked from commit 76467c3b4e89cbeea4cb352ea4cb0b97fab17295)

commit 4711cff492d66ffdee2004aee4097f805dc489bb
Author: Tomasz Krasuski <kr0tki at poczta.onet.pl>
Date:   Fri Dec 5 16:29:55 2008 -0800

    Fix bug #5928 - Option --version in testparm does not work.
    (cherry picked from commit 5eadcdfd93023157e582e04cbdadb9f55ed090bb)

commit a79d86b645949b1587bef34d51b891fc73cdf2c3
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Dec 5 14:06:04 2008 -0800

    Fix lp_socket_address() prototype.
    Jeremy.
    (cherry picked from commit 40747f209313ad6430bc35c1d82ffb5f516af621)

commit af6786b707ce936312cc629dd2a8821de8076b17
Author: Yasuma Takeda <yasuma at osstech.co.jp>
Date:   Fri Dec 5 13:37:04 2008 -0800

    Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.conf
    (cherry picked from commit bcbdb0f2394acb9130763097c8192f4b497533eb)

commit 588bff8c28c474bf4f801778623805054f5f579c
Author: Volker Lendecke <Volker.Lendecke at SerNet.DE>
Date:   Fri Dec 5 13:17:49 2008 -0800

    Fix for crash bug freeing a non-malloc'ed buffer if the client sends a non-encrypted packet with the crypto state set.
    (cherry picked from commit 8b49bf06e252b3c37ba910f8b887f48232eb1a9b)

commit e7b59ba7e1078a5fed32700931eb98301ecba2d6
Author: Steve French <stevef at smf-t60p.smfdom>
Date:   Fri Dec 5 08:33:39 2008 -0600

        mount.cifs: if mount user not specified use USER environment variable
    
        smbfs also would use the USER environment variable if the user was not
        specified on the mount command and no credential file specified, and
        mount.cifs man page says that we will use this environment variable
        (in most cases this will not cause a behavior change, because
        we were doing getuid of the current process which will usually be
        the same name).
    
        Fixes Samba bug #5934
    
        Acked-by: Jeff Layton
    (cherry picked from commit a679d0e96ec54f4660537966b31ce2f56d5a1ea9)

commit ef300361d2a6dccc15641b438eb4e14a09b90e19
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Dec 4 15:34:09 2008 -0800

    Fix bug #5937 - filenames with "*" char hide other files
    Jeremy.
    (cherry picked from commit dda44029e98d581e358146443d66d3e243163f15)

commit 40a5bfb16bfdd143a670b847935a704594d76604
Author: Henning Henkel <henning.henkel at fh-furtwangen.de>
Date:   Thu Dec 4 13:47:54 2008 -0800

    Fix bug #5929 - vfs_prealloc does not build with option --with-cluster-support and GPFS
    (cherry picked from commit e4ea7d93e6d60f5e5759e27bfa9e58ae955b0b3b)

commit 3d02fbb69e4d8e9c158e40434f01f763518589f3
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Dec 4 11:27:59 2008 -0800

    Remove unused var.
    Jeremy.
    (cherry picked from commit a27251b9d58227dd5f258cf32e4117ce5e1e15e8)

commit cc85a00fa574f29167d8e7c7821a158001194318
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Dec 4 11:12:01 2008 -0800

    Fix bug #1254 - write list not working under share-level security
    A somewhat more elegant fix than I could use for 3.2.x or 3.0.x.
    Turns out the only part of check_user_ok() that needs to change
    for share level security is the VUID cache pieces, so I can just
    always use check_user_ok() for all lp_security() cases.
    Jeremy
    (cherry picked from commit a808c53ec938a6aeb9f9ddc6a5a02273c7bfdcc9)

commit 68276aa400cb126513de06ad227febe737ec11b6
Author: Michael Adam <obnox at samba.org>
Date:   Thu Dec 4 14:04:33 2008 +0100

    winbindd: fix horrible mis-indentation of toplvl braces in getgrsid_sid2gid_r
    
    to make code more readable
    
    Michael
    (cherry picked from commit d28a0f970e06c67729d71d505c35ae1d49ad6ccc)

commit 70d181994f4920e02f608a9d5bdc60e28a42808b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 3 16:38:55 2008 +0100

    winbindd: don't open a new dc connection in winbindd_getpwnam (main winbindd)
    
    This is just to find the corresponding domain struct.
    Actual connection is handled by the domain child.
    
    Michael
    (cherry picked from commit 23f493795ce506f9dae5468edcd6c49de91c57a6)

commit 16bcd4d8bcffe80f30f30edef0b736ac9cacdf45
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 3 15:59:17 2008 +0100

    winbindd: don't open a new dc connection in winbindd_getgrnam (main winbindd)
    
    This is just to find the corresponding domain struct.
    Actual connection is handled by the domain child.
    
    Michael
    (cherry picked from commit 53e8594714a5aa6dc5fb1379f0dc5c84b517a851)

commit cebd64d5c9157b1b5c327f805d9f17759b8fe1bc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 4 12:26:03 2008 +0100

    s3:net: fix password set of 'net rpc trustdom add'
    
    metze
    (cherry-picked from commit 2b8f3e253d3a56aac996287f5ce265d0c915b3c8)
    (cherry picked from commit e1e76f19cf9c72abe4086965846b2d438cfbdd00)

commit 29f2a6fd8aa91d585e96171475c6a44893e5d54b
Author: Tim Prouty <tprouty at samba.org>
Date:   Wed Dec 3 10:37:03 2008 -0800

    Change sockaddr util function names for consistency and to eliminate name conflicts
    (cherry picked from commit f2a3617778cab1695a09f065840907e1227b6d86)

commit c0d3da886f05eca189192a1d18909371e724efc4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 3 09:07:00 2008 +0100

    libwbclient: avoid usage talloc_init() in library code
    
    talloc_init() is a compat function for the old samba3
    non-hierachical talloc implementation. It enables
    the talloc null tracking which should never be done
    by library code.
    
    metze
    (cherry picked from commit afa0d6b0b14e0ef2293bd8468ffc1d6330abdb5b)
    (cherry picked from commit 37a92ed0eb2c8cf7f3eac1d90ba5300cbce45186)

commit 3b5fa68b730b9bcfce6201e795dbf37a4a092425
Author: Kai Blin <kai at samba.org>
Date:   Tue Dec 2 16:08:49 2008 -0800

    configure.in: Fix smbtorture_s3 tests.
    
    Seems like Jeremy forgot to fix configure.in when importing d448132 to master
    in 8d674e35. Generate the vfs_streams_depot module so make test works again.
    (cherry picked from commit 56a7b902765b5b4bf76d95c4e6e66ad89920a7bf)

commit d4afae2d84a10d88af8efbe7638bc8c4e6534b1f
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Dec 2 20:50:02 2008 +0100

    docs: Add default value for "writeable" to man smb.conf.
    
    Karolin
    (cherry picked from commit c09e04ac83365333605b7b1db3d07ccfd451a667)
    (cherry picked from commit 70c581586ea02fbff4c5dde0ec002b22d472dfc5)

commit 6f455046a70215ec5b7e4e8cd83635ee4c82778e
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Dec 2 13:27:50 2008 +0100

    Implement type multi_sz for "net registry setvalue"
    (cherry picked from commit 63dbbdb33bcab7b762f308a135bb91b8dfc97757)

commit 1955cd6174c9bc8446568bfa0dda0bd3b271c5bc
Author: Tim Prouty <tprouty at samba.org>
Date:   Mon Dec 1 21:56:59 2008 -0800

    s3: Fix 'ctx' might be used unitialized warnings
    (cherry picked from commit a264409ec6787ea5a45bdde00817e2dcac3bffa2)

commit fbefea349724116ff8f40ce5934ae5efedfe8fad
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:37:40 2008 -0800

    s3:selftest: test the streams_depot module as it passes make test
    
    The streams_xattr module only passes sometimes on my laptop.
    
    metze
    (cherry picked from commit 911ba0ef15e8ed6d06e205c410ccf07ff33db929)

commit 2f17537668290e09e4e210a91bdafeac736b5f66
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:28:41 2008 -0800

    s3:smbd: close the low level fd of the base_fsp, if the file was created
    
    metze
    (cherry picked from commit 2f8049ec62c6490c6f82fa417aea296667ad99d3)

commit 0a97e945b86a8e69fb7fa2349043fbefa8f66e15
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:27:15 2008 -0800

    s3:streams_xattr: fstat should do a stat on the base file
    
    The behavior of stat and fstat should be the same.
    
    metze
    (cherry picked from commit a3b5093cb57a6212c913a6653ef180ec567f2142)

commit ff7f2473b72c0bf09dca1c0b100b4ab21f645e9b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:25:39 2008 -0800

    s3:streams_xattr: recheck fsp->fsp_name after a rename
    
    metze
    (cherry picked from commit e130087a9638ab3a479fc59f5f71bf4a3fe59c2d)

commit 3f5daae9c69495629bb4d68f2ba5b0e1c01bb540
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:23:53 2008 -0800

    s3:smbd: give the correct error when trying to replace a stream
    
    metze
    (cherry picked from commit ed56ab532abc9c36f6dbbf3e5d93d1fa6f84b0c7)

commit a6eb790e3e4d80f03033241436e0d33744d07d08
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:22:10 2008 -0800

    s3:vfs: fix FCHMOD_ACL macros
    
    metze
    (cherry picked from commit 09eca68633c1fcd5ac9c9d1c7123bc816df39b6e)

commit a5c5330c92420651d9ef8beb96b0178b300fd307
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:20:36 2008 -0800

    s3:streams_depot: add an option to disable the xattr checks
    
    streams_depot:check_valid=no is useful when the filesystem
    has no xattr support and files are only published via samba.
    
    metze
    (cherry picked from commit 6972c77fd5b4a103e850e72312f9183b8e73189b)

commit 6295161f4ff52f487573ddbae1162ca115f9e566
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:11:54 2008 -0800

    s3:streams_depot: fix valgrind bug lp_parm_const_string() doesn't talloc the default value
    
    metze
    (cherry picked from commit 1cc55ef88321927e87d5ce0c6b1edd98d2e6f936)

commit 789384d58e8a282dd1a47ffc6ec65c838038e6b3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 14:10:27 2008 -0800

    s3:streams_depot: add support for stream renames
    
    metze
    (cherry picked from commit 2e401bf868ba04285e58945a2dd5bf10605fc6d9)

commit 9ffcedb2eb580d67ae4890052a1013dfa89e26a2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:59:00 2008 -0800

    s3:streams_depot: map 'file::$DATA' to just 'file'
    
    metze
    (cherry picked from commit 507f5853bc98a240307f429c369bf920e3f2f4a4)

commit b06868667a95ab52e1dce66d07a257068341e439
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:54:32 2008 -0800

    s3:streams_xattr: add support for renaming streams
    
    metze
    (cherry picked from commit fe13b58addab1a685cd31c8f9c0341472f338071)

commit 0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:51:39 2008 -0800

    s3:smbd: only try and fallback to open a directory if it's not a stream open
    
    metze
    (cherry picked from commit 1008d353f2e4248901ae06ba3b8bd5b1251c5550)

commit 9628a6a7c73a1bce2700768153a4cdc130690ae5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:44:40 2008 -0800

    s3:smbd: write times should be set on the base file instead of the stream name
    
    metze
    (cherry picked from commit 47b270c3f83a86c3a6f4c3ae92a04c308ded9290)

commit 9ab9b7f45b966e304ff73c3701128c8c05b683a1
Author: Günther Deschner <gd at samba.org>
Date:   Mon Dec 1 22:20:41 2008 +0100

    s3-samr: fix various potential memleaks in samr_SetUserInfo.
    
    Was there any reason why we did all these individual TALLOC_FREEs ?
    
    Guenther
    (cherry picked from commit cc2da9736c8d766a27444acc84513fb0fa62a777)

commit 99d6fa2bc0dae189bf8f3ce91371083fa6d5e368
Author: Günther Deschner <gd at samba.org>
Date:   Thu Nov 27 01:25:46 2008 +0100

    s3-samr: fix return code for invalid password sets in SetUserInfo.
    
    Guenther
    (cherry picked from commit ba1308e928b14edd722478e6f7564eddc2271d02)

commit 623c2bc3eb9a427ff976ec47f4a8a032b3ce84d4
Author: Günther Deschner <gd at samba.org>
Date:   Thu Nov 27 17:29:30 2008 +0100

    s3-samr: never allow to alter pwdlastset directly.
    
    Guenther
    (cherry picked from commit d288734d862e8d35fe1cb905f8d697d3d73b42ad)

commit de671a1e9d898a16a249920bdf9fde3fa21421f4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:35:13 2008 -0800

    s3:smbd: return DELETE_PENDING on path based operations on streams, when the main file was deleted.
    
    metze
    (cherry picked from commit 7d70eac1b343641aefcbaeb6639d1b101c448cc0)

commit c882a547aa6ba539002f2e0b881de89c8e3424e9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:31:28 2008 -0800

    s3:smbd: construct the correct newname for stream renames
    
    The Windows Explorer creates temporary streams and renames
    them later via SFILEINFO_RENAME_INFO. The newname comes
    in as ":Stream:$DATA".
    
    metze
    (cherry picked from commit a92cfb4802fb42969a5e82d27d7ca4dcd966a5a3)

commit 38e4b96475e76d19e6b604630f1d9f390d23b5ba
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:27:08 2008 -0800

    s3:smbd: wildcard characters are allowed in stream names
    
    We only check the filename of the basefile now.
    
    metze
    (cherry picked from commit a47e8e7438133ca3bc1f1b577ccd9d0fde8baea0)

commit a9f98bf0402d81c484155cdb81444d697d51decb
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 13:21:56 2008 -0800

    s3:smbd: correctly verify stream names to pass RAW-STREAMS
    
    metze
    (cherry picked from commit 6f8e7146cd51c81963f9e2830a4ed7e37eefdf1f)

commit 2bc75112bff80bad2bd954e2b1bee0965b36c585
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 1 12:59:40 2008 -0800

    s3:smbd: '|' isn't allowed in windows filenames
    
    metze
    (cherry picked from commit 7435fe9d147fd495aa2dd9cc97f6fd0c1e93bddc)

commit 07692605cceb47fddc130d63b8eb22e69936ba16
Author: Steven Danneman <steven.danneman at isilon.com>
Date:   Mon Dec 1 11:12:59 2008 -0800

    Set PRESENT flag when returning NULL [SD]ACL like Windows does.
    
    This could also be handled inside each ACL VFS module, by setting the PRESENT
    flag when a NULL [SD]ACL is created.
    (cherry picked from commit efaac8049e43279266b5ea35dab8a866a96205b4)

commit bc846e275f866ae1cb71293eb4303c2c6c62d4e9
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Dec 1 17:35:19 2008 +0100

    Fix a debug message, append the correct \n
    (cherry picked from commit 263c1ca96bd68dced4577a2504073e1140fa26a1)

commit e3f65d433eb9429a76930875fb8651a5b50fe78d
Author: Michael Adam <obnox at samba.org>
Date:   Mon Dec 1 06:17:43 2008 +0100

    vfs_tsmsm: fix potential segfault (freeing uninitialized buffer)
    
    Michael
    (cherry picked from commit 87191fdbf929767dad7715acbff8a414b8091544)

commit 852e4cda48c3e48a1dd9c75b65e8b27c0be05028
Author: Michael Adam <obnox at samba.org>
Date:   Mon Dec 1 04:22:33 2008 +0100

    winbindd/nss_info: remove unused variable from nss_init()
    
    Michael
    (cherry picked from commit 479537fa1d0ffff8d7489c7e96cb416d7c1554aa)

commit 4f20c8d0c20e9f9a3576ba3d18a6e78d495c5b25
Author: Michael Adam <obnox at samba.org>
Date:   Mon Dec 1 04:22:02 2008 +0100

    winbindd/nss_info: make nss_domain_list_add_domain() static
    
    Michael
    (cherry picked from commit 606e28f35538ff42e6c0845a7e9d2415a75ccaf5)

commit e3962e8cbc0a15ddbced49cfabb56f93497b8ac5
Author: Michael Adam <obnox at samba.org>
Date:   Mon Dec 1 02:01:44 2008 +0100

    winbindd/nss_info: fix default backend handling for ad backends.
    
    This fixes "winbind nss info = rfc2307" (or sfu or sfu20).
    Originally, only explicitly configured domains (like "rfc2307:domain")
    worked with the ad module, since the domain name was not passed
    backe to the module. This is fixed by recording the first backend
    listed without domain in the "winbind nss info" parameter as the
    default backend, and creating new nss_domain entries (using this default
    backend) on the fly as requests for domains which are not explicitly
    configured are encountered.
    
    Michael
    (cherry picked from commit 348983fd92fa6ab448d490c70c0abb4f7b604b1d)

commit c4ad5061c8dc8a73dfd20a176e22093593fccbf4
Author: Michael Adam <obnox at samba.org>
Date:   Mon Dec 1 00:56:50 2008 +0100

    winbindd/nss_info: whitespace cleanup.
    
    Remove trailing spaces and fix tab / space mixup.
    
    Michael
    (cherry picked from commit 715335caca2bbdc31c4a65ecf7c3bf602cd73781)

commit 37ab9e7884f769c70493dffff26861f1c52d124a
Author: Michael Adam <obnox at samba.org>
Date:   Sun Nov 30 23:00:19 2008 +0100

    winbindd_cache: add debugging to get_nss_info_cached()
    
    Michael
    (cherry picked from commit 31531c906c336dd07b5ff217f9c1c6bedfeae40c)

commit 2dc2e803c150de9f0b91caa7967a14d753cd2dfd
Author: Michael Adam <obnox at samba.org>
Date:   Sun Nov 30 22:57:41 2008 +0100

    winbindd/nss_info: add entry debug message to nss_get_info()
    
    Michael
    (cherry picked from commit 60a469ef3fff16a8585a6c62785777563f4ec587)

commit ed4254d58cd67659792008aaf4a6949af7b03b51
Author: Michael Adam <obnox at samba.org>
Date:   Sun Nov 30 22:54:42 2008 +0100

    winbindd/nss_info: add debugging to nss_init()
    
    Michael
    (cherry picked from commit 9c1d9c31849585dbd33367db3e0708fda7b0b9f0)

commit 056fa6464b92d1102d32a96d1ce03e594994ba54
Author: Michael Adam <obnox at samba.org>
Date:   Sun Nov 30 22:50:26 2008 +0100

    winbindd/idmap_ad: add entry debug message to nss_ad_get_info()
    
    Michael
    (cherry picked from commit 8d00acb552f8f67f0b28ce7eeb8bccb0e6dcd850)

commit 5d71b64801769d4492501c3c5e226fac866083c7
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 26 23:09:49 2008 +0100

    winbindd/idmap_ad: add support for trusted domains to idmap_ad (bug #3661)
    
    This initial fix does at least work for explicitly configured domains.
    
    The patch has a few disadvantages:
    
    1. It does work only for explicitly configured domains, not with
       the default backend (idmap backend = ad), since it relies on the
       domain name being passed in via the idmap_domain. One workaround
       for this would be to create clones of the default idmap_domain
       for domains not explicitly configured.
    
    2. It calls find_domain_from_name_noinit() from idmap_ad_cached_connection.
       The problem here is that only the NetBIOS domain name (workgroup
       name) is passed in via the idmap_domain struct, and the module
       has to establish a connection to the domain based on that information.
       find_domain_from_name_noinit() has the disadvantage that it uses the state
       of the domain list at fork time (unless used from the main winbindd).
       But this should be ok as long as the primary domain was reachable at
       start time.
    
    For nss_info, the situation is similar - This will only work for domains
    explicitly configured in smb.conf as follows:
    "winbind nss info = rfc2307:dom1 sfu:dom2 rfc2307:dom3 template:dom4"
    Setting the default nss info to one of the ad backends (rfc2307, sfu, sfu20)
    will fail since the domain name is not passed in with the nss_domain_entry.
    
    Michael
    (cherry picked from commit 9423214217558036c4c88d48efead41df48d2492)

commit 5ea6a81f2a845b579568acd533750f783e65ba53
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 26 22:23:34 2008 +0100

    winbindd/idmap_ad: refactor core of nss_{sfu|sfu20|rfc2307}_init to common function.
    
    Michael
    (cherry picked from commit 1ffceacbc1696bcee6a5f0dc414487b305ba2b4c)

commit 218b39b708535f3c2e60c24b073ff9676c28d1c8
Author: Michael Adam <obnox at samba.org>
Date:   Wed Nov 26 15:16:22 2008 +0100

    winbindd/idmap_ad: rename ctx to mem_ctx in nss_ad_get_info()
    
    in preparation to using the idmap_ad_context there
    
    Michael
    (cherry picked from commit 9c23d62f07867f4d94d822f0190c6479ffb7df24)

commit b1a583adf7b49cfb4a7d301956093800b7022192
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 28 10:40:42 2008 +0100

    winbindd/idmap: add diagnostic entry debug msg to idmap_backends_sid_to_unixid
    
    Michael
    (cherry picked from commit ac878b8bdf15ad10eedb342cc5e71962b96f0b4b)

commit f5634d477e427617e8cdd6aab0554a5153d60bbc
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 28 10:40:01 2008 +0100

    winbindd/idmap: add diagnostic entry debug msg to idmap_backends_unixid_to_sid
    
    Michael
    (cherry picked from commit 18a6ad74922b9d7619c895156bc729c959ce3c84)

commit 8cba79a33415e7f73d63e9b7ce5b2c8b0388685a
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 28 10:08:46 2008 +0100

    winbindd/idmap: add diagnostic entry debug msg to idmap_find_domain().
    
    Michael
    (cherry picked from commit f33f2536acaef7444e5c1df7b69088535804d68d)

commit 48a7cec46c0b87b7f7966782fed06e318a75e8af
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 28 10:05:19 2008 +0100

    winbindd/idmap_util: unify entering debug messages and add ouput of domain
    
    Michael
    (cherry picked from commit 458d0abd07daeda2456ddf6131f04f738df4e520)

commit ce79a1a84279202cabba9694b0d91e53f528fd33
Author: Michael Adam <obnox at samba.org>
Date:   Mon Dec 1 04:17:55 2008 +0100

    winbindd/nss_info: change nss_map_{to|from}_alias to take nss_domain_entry
    
    instead of just the domain name
    
    Michael
    (cherry picked from commit d586facf3c501bcf5d67abde28febe9299518c37)

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

Summary of changes:
 docs-xml/smbdotconf/security/writeable.xml |    2 +
 release-scripts/build-docs                 |    2 +-
 source/auth/auth_util.c                    |    2 +-
 source/client/client.c                     |    2 +-
 source/client/mount.cifs.c                 |    8 +-
 source/configure.in                        |    2 +-
 source/include/nss_info.h                  |   10 +-
 source/include/proto.h                     |   16 +-
 source/include/smb.h                       |    1 -
 source/include/vfs_macros.h                |    6 +-
 source/lib/debug.c                         |    2 +-
 source/lib/interface.c                     |   10 +-
 source/lib/popt_common.c                   |    2 +-
 source/lib/util_sock.c                     |   14 +-
 source/libads/kerberos.c                   |    6 +-
 source/libsmb/cliconnect.c                 |    2 +-
 source/libsmb/clidfs.c                     |    4 +-
 source/libsmb/clilist.c                    |    2 +-
 source/libsmb/libsmb_server.c              |    6 +-
 source/libsmb/namequery.c                  |   10 +-
 source/libsmb/namequery_dc.c               |    4 +-
 source/libsmb/smb_seal.c                   |    7 +
 source/locale/pam_winbind/de.po            |  181 ++++++++++++
 source/locking/locking.c                   |   46 +---
 source/modules/vfs_prealloc.c              |    2 +-
 source/modules/vfs_streams_depot.c         |  113 +++++++-
 source/modules/vfs_streams_xattr.c         |  210 ++++++++++++++-
 source/modules/vfs_tsmsm.c                 |    2 +-
 source/nsswitch/libwbclient/wbc_sid.c      |   12 +-
 source/param/loadparm.c                    |   16 +-
 source/passdb/pdb_ldap.c                   |    2 +-
 source/printing/printing.c                 |   39 +++-
 source/rpc_server/srv_samr_nt.c            |   67 ++---
 source/rpcclient/rpcclient.c               |    2 +-
 source/script/tests/selftest.sh            |    2 +-
 source/smbd/files.c                        |    2 -
 source/smbd/nttrans.c                      |   10 +-
 source/smbd/open.c                         |   32 ++-
 source/smbd/reply.c                        |   46 +++-
 source/smbd/server.c                       |    5 +-
 source/smbd/share_access.c                 |    4 +-
 source/smbd/trans2.c                       |  110 ++++++--
 source/smbd/uid.c                          |   81 +++---
 source/torture/locktest.c                  |    4 +-
 source/torture/masktest.c                  |    4 +-
 source/torture/torture.c                   |    2 +-
 source/utils/net.c                         |    2 +-
 source/utils/net_registry.c                |    4 +
 source/utils/net_rpc.c                     |    3 +-
 source/utils/smbcacls.c                    |    2 +-
 source/utils/smbcquotas.c                  |    2 +-
 source/utils/smbfilter.c                   |    2 +-
 source/winbindd/idmap.c                    |   10 +
 source/winbindd/idmap_ad.c                 |  414 ++++++++++++++++++----------
 source/winbindd/idmap_adex/idmap_adex.c    |   16 +-
 source/winbindd/idmap_hash/idmap_hash.c    |    6 +-
 source/winbindd/idmap_util.c               |   12 +-
 source/winbindd/nss_info.c                 |  151 +++++++----
 source/winbindd/nss_info_template.c        |    4 +-
 source/winbindd/winbindd_cache.c           |    7 +
 source/winbindd/winbindd_cm.c              |    2 +-
 source/winbindd/winbindd_group.c           |    6 +-
 source/winbindd/winbindd_user.c            |    2 +-
 63 files changed, 1271 insertions(+), 488 deletions(-)
 create mode 100644 source/locale/pam_winbind/de.po


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/security/writeable.xml b/docs-xml/smbdotconf/security/writeable.xml
index f811c47..99678a9 100644
--- a/docs-xml/smbdotconf/security/writeable.xml
+++ b/docs-xml/smbdotconf/security/writeable.xml
@@ -6,4 +6,6 @@
 <description>
     <para>Inverted synonym for <smbconfoption name="read only"/>.</para>
 </description>
+
+<value type="default">no</value>
 </samba:parameter>
diff --git a/release-scripts/build-docs b/release-scripts/build-docs
index 357b4e9..b80a7fb 100755
--- a/release-scripts/build-docs
+++ b/release-scripts/build-docs
@@ -25,7 +25,7 @@ cd ../docs || exit 1
 mv manpages-3 manpages
 mv htmldocs/manpages-3 htmldocs/manpages
 
-cd $DOCSRCDIR || exit 1
+cd ../docs-xml || exit 1
 make clean
 
 exit
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 9220df0..d2a8591 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -1294,7 +1294,7 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
 
 
 struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
-						 auth_serversupplied_info *src)
+						 const auth_serversupplied_info *src)
 {
 	auth_serversupplied_info *dst;
 
diff --git a/source/client/client.c b/source/client/client.c
index 3048d95..d05a82a 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -4615,7 +4615,7 @@ static int do_message_op(void)
 	snprintf(name_type_hex, sizeof(name_type_hex), "#%X", name_type);
 	fstrcat(server_name, name_type_hex);
 
-        zero_addr(&ss);
+        zero_sockaddr(&ss);
 	if (have_ip)
 		ss = dest_ss;
 
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index da2f98b..0bc61ae 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -1293,7 +1293,13 @@ int main(int argc, char ** argv)
 	}
 
 	if(got_user == 0) {
-		user_name = getusername();
+		/* Note that the password will not be retrieved from the
+		   USER env variable (ie user%password form) as there is
+		   already a PASSWD environment varaible */
+		if (getenv("USER"))
+			user_name = strdup(getenv("USER"));
+		if (user_name == NULL)
+			user_name = getusername();
 		got_user = 1;
 	}
        
diff --git a/source/configure.in b/source/configure.in
index 49732b6..798a0f8 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -409,7 +409,7 @@ dnl These have to be built static:
 default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl2 rpc_ntsvcs2 rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog2 auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template"
 
 dnl These are preferably build shared, and static if dlopen() is not available
-default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer"
+default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer"
 
 if test "x$developer" = xyes; then
    default_static_modules="$default_static_modules rpc_rpcecho"
diff --git a/source/include/nss_info.h b/source/include/nss_info.h
index e756136..0224be0 100644
--- a/source/include/nss_info.h
+++ b/source/include/nss_info.h
@@ -66,10 +66,12 @@ struct nss_info_methods {
 				  TALLOC_CTX *ctx, 
 				  ADS_STRUCT *ads, LDAPMessage *msg,
 				  char **homedir, char **shell, char **gecos, gid_t *p_gid);
-	NTSTATUS (*map_to_alias)( TALLOC_CTX *mem_ctx, const char *domain,
-				  const char *name, char **alias );
-	NTSTATUS (*map_from_alias)( TALLOC_CTX *mem_ctx, const char *domain,
-				    const char *alias, char **name );
+	NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
+				 struct nss_domain_entry *e,
+				 const char *name, char **alias);
+	NTSTATUS (*map_from_alias)(TALLOC_CTX *mem_ctx,
+				   struct nss_domain_entry *e,
+				   const char *alias, char **name);
 	NTSTATUS (*close_fn)( void );
 };
 
diff --git a/source/include/proto.h b/source/include/proto.h
index 99e9d76..41624c9 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -121,7 +121,7 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
 				       bool is_guest,
 				       struct auth_serversupplied_info **presult);
 struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
-						 auth_serversupplied_info *src);
+						 const auth_serversupplied_info *src);
 bool init_guest_info(void);
 bool server_info_set_session_key(struct auth_serversupplied_info *info,
 				 DATA_BLOB session_key);
@@ -1538,14 +1538,14 @@ bool is_loopback_addr(const struct sockaddr_storage *pss);
 bool is_zero_ip_v4(struct in_addr ip);
 bool is_zero_addr(const struct sockaddr_storage *pss);
 void zero_ip_v4(struct in_addr *ip);
-void zero_addr(struct sockaddr_storage *pss);
+void zero_sockaddr(struct sockaddr_storage *pss);
 bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
 void in_addr_to_sockaddr_storage(struct sockaddr_storage *ss,
 		struct in_addr ip);
 bool same_net(const struct sockaddr_storage *ip1,
 		const struct sockaddr_storage *ip2,
 		const struct sockaddr_storage *mask);
-bool addr_equal(const struct sockaddr_storage *ip1,
+bool sockaddr_equal(const struct sockaddr_storage *ip1,
 		const struct sockaddr_storage *ip2);
 bool is_address_any(const struct sockaddr_storage *psa);
 uint16_t get_sockaddr_port(const struct sockaddr_storage *pss);
@@ -5213,7 +5213,7 @@ bool is_valid_share_mode_entry(const struct share_mode_entry *e);
 bool is_deferred_open_entry(const struct share_mode_entry *e);
 bool is_unused_share_mode_entry(const struct share_mode_entry *e);
 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
-			uid_t uid, uint16 mid, uint16 op_type, bool initial_delete_on_close_allowed);
+		    uid_t uid, uint16 mid, uint16 op_type);
 void add_deferred_open(struct share_mode_lock *lck, uint16 mid,
 		       struct timeval request_time,
 		       struct file_id id);
@@ -5223,11 +5223,9 @@ bool remove_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp);
 NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
 				 uint32 dosmode);
-bool can_set_initial_delete_on_close(const struct share_mode_lock *lck);
 void set_delete_on_close_token(struct share_mode_lock *lck, UNIX_USER_TOKEN *tok);
 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, UNIX_USER_TOKEN *tok);
 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKEN *tok);
-bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, bool delete_on_close);
 bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
 bool set_write_time(struct file_id fileid, struct timespec write_time);
 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
@@ -5681,7 +5679,7 @@ char *lp_remote_announce(void);
 char *lp_remote_browse_sync(void);
 const char **lp_wins_server_list(void);
 const char **lp_interfaces(void);
-char *lp_socket_address(void);
+const char *lp_socket_address(void);
 char *lp_nis_home_map_name(void);
 const char **lp_netbios_aliases(void);
 const char *lp_passdb_backend(void);
@@ -10246,10 +10244,10 @@ bool token_contains_name_in_list(const char *username,
 				 const struct nt_user_token *token,
 				 const char **list);
 bool user_ok_token(const char *username, const char *domain,
-		   struct nt_user_token *token, int snum);
+		   const struct nt_user_token *token, int snum);
 bool is_share_read_only_for_token(const char *username,
 				  const char *domain,
-				  struct nt_user_token *token,
+				  const struct nt_user_token *token,
 				  connection_struct *conn);
 
 /* The following definitions come from smbd/srvstr.c  */
diff --git a/source/include/smb.h b/source/include/smb.h
index bcf7de9..7f82f72 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -717,7 +717,6 @@ struct pending_message_list {
 };
 
 #define SHARE_MODE_FLAG_POSIX_OPEN	0x1
-#define SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE      0x2
 
 /* struct returned by get_share_modes */
 struct share_mode_entry {
diff --git a/source/include/vfs_macros.h b/source/include/vfs_macros.h
index 7b3aeaa..8fbc21b 100644
--- a/source/include/vfs_macros.h
+++ b/source/include/vfs_macros.h
@@ -92,7 +92,7 @@
 
 /* POSIX ACL operations. */
 #define SMB_VFS_CHMOD_ACL(conn, name, mode) ((conn)->vfs.ops.chmod_acl((conn)->vfs.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.chmod_acl, (fsp), (mode)))
+#define SMB_VFS_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs.ops.fchmod_acl((fsp)->conn->vfs.handles.fchmod_acl, (fsp), (mode)))
 
 #define SMB_VFS_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs.ops.sys_acl_get_entry((conn)->vfs.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
 #define SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs.ops.sys_acl_get_tag_type((conn)->vfs.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
@@ -217,7 +217,7 @@
 
 /* POSIX ACL operations. */
 #define SMB_VFS_OPAQUE_CHMOD_ACL(conn, name, mode) ((conn)->vfs_opaque.ops.chmod_acl((conn)->vfs_opaque.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.chmod_acl, (fsp), (mode)))
+#define SMB_VFS_OPAQUE_FCHMOD_ACL(fsp, mode) ((fsp)->conn->vfs_opaque.ops.fchmod_acl((fsp)->conn->vfs_opaque.handles.fchmod_acl, (fsp), (mode)))
 
 #define SMB_VFS_OPAQUE_SYS_ACL_GET_ENTRY(conn, theacl, entry_id, entry_p) ((conn)->vfs_opaque.ops.sys_acl_get_entry((conn)->vfs_opaque.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
 #define SMB_VFS_OPAQUE_SYS_ACL_GET_TAG_TYPE(conn, entry_d, tag_type_p) ((conn)->vfs_opaque.ops.sys_acl_get_tag_type((conn)->vfs_opaque.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
@@ -343,7 +343,7 @@
 
 /* POSIX ACL operations. */
 #define SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode) ((handle)->vfs_next.ops.chmod_acl((handle)->vfs_next.handles.chmod_acl, (name), (mode)))
-#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.chmod_acl, (fsp), (mode)))
+#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) ((handle)->vfs_next.ops.fchmod_acl((handle)->vfs_next.handles.fchmod_acl, (fsp), (mode)))
 
 #define SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id, entry_p) ((handle)->vfs_next.ops.sys_acl_get_entry((handle)->vfs_next.handles.sys_acl_get_entry, (theacl), (entry_id), (entry_p)))
 #define SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d, tag_type_p) ((handle)->vfs_next.ops.sys_acl_get_tag_type((handle)->vfs_next.handles.sys_acl_get_tag_type, (entry_d), (tag_type_p)))
diff --git a/source/lib/debug.c b/source/lib/debug.c
index d91b55d..b3e1a72 100644
--- a/source/lib/debug.c
+++ b/source/lib/debug.c
@@ -851,7 +851,7 @@ void check_log_size( void )
 		ret = vasprintf(&msgbuf, format_str, ap);
 		va_end(ap);
 
-		if (ret == -1) {
+		if (ret != -1) {
 			syslog(priority, "%s", msgbuf);
 		}
 		SAFE_FREE(msgbuf);
diff --git a/source/lib/interface.c b/source/lib/interface.c
index 2e7c270..15fed9e 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -33,7 +33,7 @@ bool ismyaddr(const struct sockaddr_storage *ip)
 {
 	struct interface *i;
 	for (i=local_interfaces;i;i=i->next) {
-		if (addr_equal(&i->ip,ip)) {
+		if (sockaddr_equal(&i->ip,ip)) {
 			return true;
 		}
 	}
@@ -65,7 +65,7 @@ static struct interface *iface_find(const struct sockaddr_storage *ip,
 			if (same_net(ip, &i->ip, &i->netmask)) {
 				return i;
 			}
-		} else if (addr_equal(&i->ip, ip)) {
+		} else if (sockaddr_equal(&i->ip, ip)) {
 			return i;
 		}
 	}
@@ -93,7 +93,7 @@ void setup_linklocal_scope_id(struct sockaddr_storage *pss)
 {
 	struct interface *i;
 	for (i=local_interfaces;i;i=i->next) {
-		if (addr_equal(&i->ip,pss)) {
+		if (sockaddr_equal(&i->ip,pss)) {
 			struct sockaddr_in6 *psa6 =
 				(struct sockaddr_in6 *)pss;
 			psa6->sin6_scope_id = if_nametoindex(i->name);
@@ -388,7 +388,7 @@ static void interpret_interface(char *token)
 		}
 
 		for (i=0;i<total_probed;i++) {
-			if (addr_equal(&ss, &probed_ifaces[i].ip)) {
+			if (sockaddr_equal(&ss, &probed_ifaces[i].ip)) {
 				add_interface(&probed_ifaces[i]);
 				return;
 			}
@@ -441,7 +441,7 @@ static void interpret_interface(char *token)
 	make_net(&ss_net, &ss, &ss_mask);
 
 	/* Maybe the first component was a broadcast address. */
-	if (addr_equal(&ss_bcast, &ss) || addr_equal(&ss_net, &ss)) {
+	if (sockaddr_equal(&ss_bcast, &ss) || sockaddr_equal(&ss_net, &ss)) {
 		for (i=0;i<total_probed;i++) {
 			if (same_net(&ss, &probed_ifaces[i].ip, &ss_mask)) {
 				/* Temporarily replace netmask on
diff --git a/source/lib/popt_common.c b/source/lib/popt_common.c
index 2e6d3b3..9e67c52 100644
--- a/source/lib/popt_common.c
+++ b/source/lib/popt_common.c
@@ -166,7 +166,7 @@ struct poptOption popt_common_configfile[] = {
 };
 
 struct poptOption popt_common_version[] = {
-	{ NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback },
+	{ NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_POST, (void *)popt_common_callback },
 	{ "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" },
 	POPT_TABLEEND
 };
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index e20768e..e64b003 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -234,7 +234,7 @@ bool interpret_string_addr(struct sockaddr_storage *pss,
 	}
 #endif
 
-	zero_addr(pss);
+	zero_sockaddr(pss);
 
 	if (!interpret_string_addr_internal(&res, str, flags|AI_ADDRCONFIG)) {
 		return false;
@@ -334,7 +334,7 @@ void zero_ip_v4(struct in_addr *ip)
  Set an address to INADDR_ANY.
 ******************************************************************/
 
-void zero_addr(struct sockaddr_storage *pss)
+void zero_sockaddr(struct sockaddr_storage *pss)
 {
 	memset(pss, '\0', sizeof(*pss));
 	/* Ensure we're at least a valid sockaddr-storage. */
@@ -429,8 +429,8 @@ bool same_net(const struct sockaddr_storage *ip1,
  Are two sockaddr_storage's the same family and address ? Ignore port etc.
 ********************************************************************/
 
-bool addr_equal(const struct sockaddr_storage *ip1,
-		const struct sockaddr_storage *ip2)
+bool sockaddr_equal(const struct sockaddr_storage *ip1,
+		    const struct sockaddr_storage *ip2)
 {
 	if (ip1->ss_family != ip2->ss_family) {
 		/* Never the same. */
@@ -1659,7 +1659,7 @@ static bool matchname(const char *remotehost,
 		if (!res->ai_addr) {
 			continue;
 		}
-		if (addr_equal((const struct sockaddr_storage *)res->ai_addr,
+		if (sockaddr_equal((const struct sockaddr_storage *)res->ai_addr,
 					pss)) {
 			freeaddrinfo(ailist);
 			return true;
@@ -1772,7 +1772,7 @@ const char *get_peer_name(int fd, bool force_lookup)
 	p = get_peer_addr_internal(fd, addr_buf, sizeof(addr_buf), &ss, &length);
 
 	/* it might be the same as the last one - save some DNS work */
-	if (addr_equal(&ss, &nc.ss)) {
+	if (sockaddr_equal(&ss, &nc.ss)) {
 		return nc.name ? nc.name : "UNKNOWN";
 	}
 
@@ -2091,7 +2091,7 @@ bool is_myname_or_ipaddr(const char *s)
 		}
 		n = get_interfaces(nics, MAX_INTERFACES);
 		for (i=0; i<n; i++) {
-			if (addr_equal(&nics[i].ip, &ss)) {
+			if (sockaddr_equal(&nics[i].ip, &ss)) {
 				TALLOC_FREE(nics);
 				return true;
 			}
diff --git a/source/libads/kerberos.c b/source/libads/kerberos.c
index 501ef01..56c3af8 100644
--- a/source/libads/kerberos.c
+++ b/source/libads/kerberos.c
@@ -772,7 +772,7 @@ static char *get_kdc_ip_string(char *mem_ctx,
 		get_kdc_list(realm, sitename, &ip_srv_site, &count_site);
 
 		for (i = 0; i < count_site; i++) {
-			if (addr_equal(&ip_srv_site[i].ss, pss)) {
+			if (sockaddr_equal(&ip_srv_site[i].ss, pss)) {
 				continue;
 			}
 			/* Append to the string - inefficient
@@ -794,13 +794,13 @@ static char *get_kdc_ip_string(char *mem_ctx,
 	for (i = 0; i < count_nonsite; i++) {
 		int j;
 
-		if (addr_equal(&ip_srv_nonsite[i].ss, pss)) {
+		if (sockaddr_equal(&ip_srv_nonsite[i].ss, pss)) {
 			continue;
 		}
 
 		/* Ensure this isn't an IP already seen (YUK! this is n*n....) */
 		for (j = 0; j < count_site; j++) {
-			if (addr_equal(&ip_srv_nonsite[i].ss,
+			if (sockaddr_equal(&ip_srv_nonsite[i].ss,
 						&ip_srv_site[j].ss)) {
 				break;
 			}
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 8ef14d7..69f84aa 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -1622,7 +1622,7 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli,
 	if (dest_ss) {
 		ss = *dest_ss;
 	} else {
-		zero_addr(&ss);
+		zero_sockaddr(&ss);
 	}
 
 again:
diff --git a/source/libsmb/clidfs.c b/source/libsmb/clidfs.c
index 7b63f95..35922b1 100644
--- a/source/libsmb/clidfs.c
+++ b/source/libsmb/clidfs.c
@@ -144,13 +144,13 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
 
 	server_n = server;
 
-	zero_addr(&ss);
+	zero_sockaddr(&ss);
 
 	make_nmb_name(&calling, global_myname(), 0x0);
 	make_nmb_name(&called , server, name_type);
 
  again:
-	zero_addr(&ss);
+	zero_sockaddr(&ss);
 	if (have_ip)
 		ss = dest_ss;
 
diff --git a/source/libsmb/clilist.c b/source/libsmb/clilist.c
index 5091845..cebafc6 100644
--- a/source/libsmb/clilist.c
+++ b/source/libsmb/clilist.c
@@ -417,7 +417,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
 		}
 
 		SAFE_FREE(mask);
-		if (ff_searchcount > 0) {
+		if (ff_searchcount > 0 && ff_eos == 0 && finfo.name) {
 			mask = SMB_STRDUP(finfo.name);
 		} else {
 			mask = SMB_STRDUP("");
diff --git a/source/libsmb/libsmb_server.c b/source/libsmb/libsmb_server.c
index 0a3287b..9b4d3f6 100644
--- a/source/libsmb/libsmb_server.c
+++ b/source/libsmb/libsmb_server.c
@@ -248,7 +248,7 @@ SMBC_server(TALLOC_CTX *ctx,
         const char *username_used;
  	NTSTATUS status;
         
-	zero_addr(&ss);
+	zero_sockaddr(&ss);
 	ZERO_STRUCT(c);
         
 	if (server[0] == 0) {
@@ -348,7 +348,7 @@ SMBC_server(TALLOC_CTX *ctx,
         
 again:
         
-	zero_addr(&ss);
+	zero_sockaddr(&ss);
         
 	/* have to open a new connection */
 	if ((c = cli_initialise()) == NULL) {
@@ -595,7 +595,7 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                         flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
                 }
                 
-                zero_addr(&ss);
+                zero_sockaddr(&ss);
                 nt_status = cli_full_connection(&ipc_cli,
 						global_myname(), server,
 						&ss, 0, "IPC$", "?????",
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index 24d7ee1..5945683 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -331,7 +331,7 @@ bool name_status_find(const char *q_name,
 
 	if (!interpret_string_addr(&ss, lp_socket_address(),
 				AI_NUMERICHOST|AI_PASSIVE)) {
-		zero_addr(&ss);
+		zero_sockaddr(&ss);
 	}
 
 	sock = open_socket_in(SOCK_DGRAM, 0, 3, &ss, True);
@@ -526,9 +526,9 @@ static int remove_duplicate_addrs2(struct ip_service *iplist, int count )
 		}
 
 		for ( j=i+1; j<count; j++ ) {
-			if (addr_equal(&iplist[i].ss, &iplist[j].ss) &&
+			if (sockaddr_equal(&iplist[i].ss, &iplist[j].ss) &&
 					iplist[i].port == iplist[j].port) {
-				zero_addr(&iplist[j].ss);
+				zero_sockaddr(&iplist[j].ss);
 			}
 		}
 	}
@@ -954,7 +954,7 @@ NTSTATUS name_resolve_bcast(const char *name,
 
 	if (!interpret_string_addr(&ss, lp_socket_address(),
 				AI_NUMERICHOST|AI_PASSIVE)) {
-		zero_addr(&ss);
+		zero_sockaddr(&ss);
 	}
 
 	sock = open_socket_in( SOCK_DGRAM, 0, 3, &ss, true );
@@ -1042,7 +1042,7 @@ NTSTATUS resolve_wins(const char *name,
 	/* the address we will be sending from */
 	if (!interpret_string_addr(&src_ss, lp_socket_address(),
 				AI_NUMERICHOST|AI_PASSIVE)) {
-		zero_addr(&src_ss);
+		zero_sockaddr(&src_ss);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list