summaryrefslogtreecommitdiffstats
path: root/source
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix bug 5805: don't close stdoutDerrell Lipman2008-10-061-1/+3
| | | | | | | | | - When calling setup_logging multiple times, the code was closing the debug file descriptor before opening or assigning the new one. We don't, however, want to close the debug file descriptor if it is stdout. Derrell (cherry picked from commit 7142872d2c6e0be42307671afa31016f6940007d)
* Whitespace cleanup.Jeremy Allison2008-10-061-19/+19
| | | | | Jeremy. (cherry picked from commit d596f78517f33f5a4c4849be3162d4f3031f045f)
* Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.Jeremy Allison2008-10-063-5/+5
| | | | | | | | | | | | | | | | | | This API is unusual in that if used to remove a non-list head it nulls out the next and prev pointers. This is what you want for debugging (don't want an entry removed from the list to be still virtually linked into it) but means there is no consistent idiom for use as the next and prev pointers get trashed on removal from the list, meaning you must save them yourself. You can use it one way when deleting everything via the head pointer, as this preserves the next pointer, but you *must* use it another way when not deleting everything via the head pointer. Fix all known uses of this (the main one is in conn_free_internal() and would not free all the private data entries for vfs modules. The other changes in web/statuspage.c and winbindd_util.c are not strictly neccessary, as the head pointer is being used, but I've done them for consistency. Long term we must revisit this as this API is too hard to use correctly. Jeremy. (cherry picked from commit 347fc4ed725083f2c520afc39f7c81db0dd60324)
* Turn the socket connections into a refcounted list - in the common case ↵Jeremy Allison2008-10-061-44/+94
| | | | | | | | | | there'll now only be one socket per smbd. Changed the format of the wire data to (a) include a version number (V1) as the first element. (b) removed the ";)" at the end an replaced it with a "\n". Receiver can change back if needed, and now receiver can just log "as-is" to a text file (making testing easier). Added my (C). Sorry Holger, but I've changed quite a bit now. Jeremy. (cherry picked from commit 7ea95c19305a2fb6efc95acc4e96f083e31f6c6f)
* Convert to allocated strings. Use write_data(), not send as this doesn't ↵Jeremy Allison2008-10-061-58/+42
| | | | | | | | correctly deal with EINTR. Jim and Holger please check this still works. Jeremy. (cherry picked from commit dc1ff1a9c07edf7e3e649b256667704ad59aafbd)
* Restructure the module so it connects to the remote data sinkJeremy Allison2008-10-061-150/+156
| | | | | | | | | on connect, and closes the socket on client disconnect. This should make it much more efficient. Store the remote fd in a private data pointer off the handle. Finally we need to remove the fstrings and convert to allocated buffer storage. Jeremy. (cherry picked from commit 2f7884babcefcb04d1f9a877dde41e11b0f7b825)
* Fix the make test problem Karolin reported. Now rename_open_files actually ↵Jeremy Allison2008-10-061-2/+2
| | | | | | | works correctly we must emit the change notify before we change the name, not before. Jeremy. (cherry picked from commit 10ae99d86c0c90bee9a0538854f6f96fc7cbbc23)
* re-added "winbind:ignore domains" patchAndrew Tridgell2008-10-061-3/+21
| | | | | | | | | | | | | This option really is essential, as we discover again and again at customer sites. Due to bugs in winbind some domains are toxic. When you are installing at a site and a particular domain in a complex setup causes winbind to segfault or hang then you need a way to disable that domain and continue. In an ideal world winbind could handle arbitrarily complex ADS domains, but we are nowhere near that yet. If we ever get to that stage then we won't need this option. (cherry picked from commit 41898a42c1ad7d382088799a6e3f712583808d20)
* fixed segv on startup with trusted domainsAndrew Tridgell2008-10-061-1/+21
| | | | | | | With some setups, idmap_tdb2_allocate_id can be called before the allocate backend is initialised, leading to a segv. This change ensures that the db is opened in all paths that use it (cherry picked from commit 3a2a70996919a7ee08fea40b8e5f1cf2e3bd7caf)
* Ensure we null out fsp after a close in all paths.Jeremy Allison2008-10-061-0/+1
| | | | | Jeremy. (cherry picked from commit 3cba8305bd32c7a83fd9c39eaea953b8a0199b22)
* Avoid freeing fsp twice when opening new_file fails. (Debian #431696)Jelmer Vernooij2008-10-061-0/+1
| | | | | | If opening new_file fails, fsp would still be set to the files_struct of old_file. (cherry picked from commit f75b53f85cbccc4b37db4c9adc0df81a06898d38)
* Second part of the fix for bug #5790 - samba returns ↵Jeremy Allison2008-10-061-4/+6
| | | | | | | | STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call. This was my fault. I use a singleton cache (positive and negative) to speed up pathname based qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the cache was set. Doh ! Jeremy. (cherry picked from commit a7fd59a26bfc4a98b6936dc3ac8e67e1a7cb3733)
* Fix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de.Jeremy Allison2008-10-061-3/+1
| | | | | | | | | We don't need to deny a DELETE open on a readonly file (I'm also adding a s4 torture test for this), the set_file_disposition call will return NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set on a readonly file (and we already do this). Jeremy. (cherry picked from commit dd43302066b2d3f5270d3ee25a1e2c85d8ce2b85)
* s3-srvsvc: fix _srvsvc_NetShareAdd segfault.Günther Deschner2008-10-061-1/+3
| | | | | | | | parm_err is not a ref pointer. Guenther (cherry picked from commit 29942b7043c1a31ad4fb76d01ab19fd3dbf26f0a) (cherry picked from commit 6debf35c1575a25f98f927726742a7f34b3a55a9)
* Use IPv4/v6 independent calls. Change safe_strcpy/cat to strlcpy/cat (thisJeremy Allison2008-10-061-84/+97
| | | | | | | needs changing to talloc_sprintf) and fix file descriptor resource leaks in error paths. Jim and Holger please check ! Jeremy. (cherry picked from commit d55becbe492cf3c95ef45ebb2c123067a9297b4f)
* Fix the new vfs_smb_traffic_analyzer build for static linksJim McDonough2008-10-061-2/+2
| | | | (cherry picked from commit d36039acd8f1722ba76b5999d7fea4f046735817)
* SMB traffic analyzer vfs module from Holger Hetterich <hhetter@novell.com>Holger Hetterich2008-10-063-1/+358
| | | | | | | | | Used to gather data to feed to a database for live and historical analysis of usage per user, per share, etc. Helper apps to read the data still to come. This one still needs to be made ipv6 enabled (connection is made to the helper app). (cherry picked from commit baf49e5fcabd3682927fe19974c97bbae4be7379)
* Fix bug #5790 samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file ↵Jeremy Allison2008-10-061-4/+2
| | | | | | | | | disposition. We were checking that fd != -1 in file_find_di_XXX calls which is no longer needed due to a change in internal semantics. Jeremy. (cherry picked from commit bd7acd6344022e87495edc124e262eb50ba5ebd8)
* Fix winbindd crash in an unusual failure mode. Bug #5737. Based on original ↵Jeremy Allison2008-10-061-5/+9
| | | | | | | patch from shargagan@novell.com Jeremy. (cherry picked from commit 0a0426650e596453b4b8aa6536f4fe8b1d890451)
* Fix bug #5783 FindFirst fails where search pattern == mangled filename.Jeremy Allison2008-10-062-8/+8
| | | | | | That was an old and subtle bug. Jeremy. (cherry picked from commit c412888f916563c44c4c753884df23c1951f6e27)
* build: don't install the cifs.upcall binary twice.Günther Deschner2008-09-181-1/+1
| | | | | | | | Guenther (cherry picked from commit 1f44b4aaa5f700827ee2ab272ae4b59e559b094b) (cherry picked from commit 020c03bff844ef976dd786a755c4d682bf161a3d) (cherry picked from commit 5a9a190a5588b0cf938bc5c9659b7704d18cd4a3) (cherry picked from commit c83295d3b575be80a432c4716be62cd63eb3bdef)
* VERSION: Raise version number up to 3.2.5.Karolin Seeger2008-09-181-1/+1
| | | | Karolin
* Ensure all pointers are initialized. Without this we can crash when looking ↵Jeremy Allison2008-09-181-20/+20
| | | | | | | up a non-existant uid. Jeremy. (cherry picked from commit a31b006a411266adf49d2eefd1f80bbb091f0c4c)
* idmap_ad: Fix a segfault when calling nss_get_info() with a NULL ads structure.Gerald W. Carter2008-09-171-12/+69
| | | | (cherry picked from commit 30a660ea41faa3b84afa8819c7673b3fe334e79b)
* Fix aio on FreeBSD.Timur2008-09-162-1/+31
| | | | (cherry picked from commit 144b1bb05a734e15369d6d59636b6849d9405af5)
* Fix display of POSIX ACLs.Timur2008-09-161-2/+2
| | | | (cherry picked from commit faa732c245c9296ff4cd4a56f353c3d5d1b0d202)
* Fix cut and paste error in quota code.Timur2008-09-161-2/+2
| | | | (cherry picked from commit c2a05d4ed34aa8185a7d236e8d7b1493d67a3068)
* Simple fix for warning:Steven Danneman2008-09-161-1/+1
| | | | | | | Compiling utils/sharesec.c utils/sharesec.c: In function `change_share_sec': utils/sharesec.c:404: warning: 'sd' might be used uninitialized in this function (cherry picked from commit 931abf7898f574fcf70c239b2ad5c180ff6bb8e8)
* Fix build warning on FreeBSDSteven Danneman2008-09-161-2/+2
| | | | | | | | | | | | | Fix for the following build warning: Compiling torture/cmd_vfs.c torture/cmd_vfs.c: In function `cmd_open': torture/cmd_vfs.c:275: warning: unsigned int format, different type arg (arg 3) torture/cmd_vfs.c: In function `cmd_mknod': torture/cmd_vfs.c:992: warning: unsigned int format, different type arg (arg 3) sccanf had mismatched types for mode_t between formating parameter and var args. (cherry picked from commit d10c386472175ceb312b9bcca07822a6df66a266)
* Fix bug 5761 "open of mangled directory name results in 'is a stream name'"Jeremy Allison2008-09-161-3/+7
| | | | | | reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>. Jeremy. (cherry picked from commit 1b839eb9e4a6312e638d1856d1225b170525da7e)
* mount.cifs: make local versions of strlcat and strlcpy staticJeff Layton2008-09-151-2/+2
| | | | | | | ...to silence -Wmissing-prototypes Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit b08f07f84e448e56116b84ba5fa59b211e584822)
* cifs.upcall: make most functions static and silence compiler warningsJeff Layton2008-09-151-7/+11
| | | | | | | | ...to silence -Wmissing-prototypes and some uninit'ed variable warnings. Thanks to GD for the extra-paranoid compiler flags. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit bc5274eb66ebe40aea3ab917a20f2f353172ca93)
* Modify a comment to make things clearer.Jeremy Allison2008-09-151-1/+3
| | | | | Jeremy. (cherry picked from commit 46a5c08b101f1c218ecd6397614dde1d13a9077a)
* cifs.upcall: move default install location to EPREFIX/sbinJeff Layton2008-09-151-4/+4
| | | | | | | | | cifs.upcall links to libraries that live under /usr, so installing it in /sbin doesn't seem appropriate. Move it to EPREFIX/sbin instead (i.e. /usr/sbin). Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit fe280993dea71b87b6042d6aded389b10bcd0b56)
* cifs.upcall: enable building by default on linuxJeff Layton2008-09-151-4/+19
| | | | | | | | When building on linux, default to building cifs.upcall. Throw a warning if ADS support is disabled or keyutils isn't installed. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 7f1193d3c83b0c19f17c8f70542491222c9644da)
* Use the given name, not the absolute pathname, when printing out ACL info.Jeremy Allison2008-09-151-1/+1
| | | | | | Make this match the non-ACL case. Jeremy. (cherry picked from commit 1ca6239b9f67caafed50db5f284df00c5988ba03)
* Fix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu ↵Jeremy Allison2008-09-152-35/+56
| | | | | | | | <fumiyas@osstech.co.jp>. Fix for smbclient and libsmbclient. Jeremy. (cherry picked from commit 71d00ef2888834ebed2a387a111a95bac1d227ad)
* Fix for bug 5571Simo Sorce2008-09-112-2/+28
| | | | | | Make sure that usernames are parsed using the correct separator. Otherwise group memeberships in winbind may be result broken. (cherry picked from commit a2c313182135fc4f7596a595c5143b7bb71a0bdf)
* Fix bug #5052 - not work cancel inheritance on share. We wereJeremy Allison2008-09-111-3/+10
| | | | | | | using the parent security descriptor type and flags instead of using the passed in SD. Jeremy. (cherry picked from commit c22bf57329f16a45eb0954b72f8083270f6535e7)
* When requesting UNIX info levels on findfirst/findnext, don't play games ↵Jeremy Allison2008-09-111-1/+5
| | | | | | | | with write time, just return what the underlying filesystem says. Trying not to confuse UNIX apps any more than necessary. Jeremy. (cherry picked from commit 4e06c71a12654d78c9a94fb023e372920bf7618b)
* Fix blocker bug 5745 kerberos authentication with (lib)smbclient is broken.Jeremy Allison2008-09-111-8/+13
| | | | | Jeremy. (cherry picked from commit 738729cad0b88a2f453d61d38e1088003afd0a9e)
* Fix calculation of useable_space for trans2 and nttrans repliesVolker Lendecke2008-09-092-18/+19
| | | | | | | When alignment was in place, we pretended to send more data/params according to the param_offset/param_length and data_offset/data_length parameters than would actually fit into the SMB according to the NBSS length field. (cherry picked from commit 2ae870aead5e0ea7e7f9f6f9730f989ae34755b9)
* smbd: some write time fixesStefan Metzmacher2008-09-092-8/+8
| | | | | | | | | | | | | | | - only the first non truncating write causes the write time update with 2 seconds delay. It's not enough to check for an existing update event as it will be NULL after the event was triggered. - SMBwrite truncates always update the write time unless the sticky write time is set. - SMBwrite truncates don't trigger a write time update on close. metze (cherry picked from commit 142a9703ae19a467a23ee72429f899dae156df64)
* When setting an NFSv4 ACL, map generic bitsVolker Lendecke2008-09-091-0/+4
| | | | | (cherry picked from commit dbe7a61be2beac50d1665e38ac374cefbbabec00) (cherry picked from commit c2faa48abce1d656527b89f601e084e3ba70e36d)
* Fix debug message to show correct function name.Jeremy Allison2008-09-091-1/+1
| | | | | Jeremy. (cherry picked from commit b2fcb8b6b17302e5ec29914f4e3dde853ffe5283)
* Write times code update.Jeremy Allison2008-09-096-41/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, here's the fix for the write times breakage with the new tests in S4 smbtorture. The key is keeping in the share mode struct the "old_file_time" as the real write time, set by all the write and allocation calls, and the "changed_write_time" as the "sticky" write time - set by the SET_FILE_TIME calls. We can set them independently (although I kept the optimization of not setting the "old_file_time" is a "changed_write_time" was already set, as we'll never see it. This allows us to update the write time immediately on the SMBwrite truncate case, SET_END_OF_FILE and SET_ALLOCATION_SIZE calls, whilst still have the 2 second delay on the "normal" SMBwrite, SMBwriteX calls. I think in a subsequent patch I'd like to change the name of these from "old_file_time" to "write_time" and "changed_write_time" to "sticky_write_time" to make this clearer. I think I also fixed a bug in Metze's original code in that once a write timestamp had been set from a "normal" SMBwriteX call the fsp->update_write_time_triggered variable was set and then never reset - thus meaning the write timestamp would never get updated again on subsequent SMBwriteX's. The new code checks the update_write_time_event event instead, and doesn't update is there's an event already scheduled. Metze especially, please check this over for your understanding. Jeremy. (cherry picked from commit f2fb6321b6666a30ca7fa11bc8d395f1a1865bb2)
* Remove unecessary msync.Jeremy Allison2008-09-081-4/+0
| | | | | Jeremy. (cherry picked from commit d7eab4b20af47401d281dd672e012d4eb96e5f4a)
* Fix a memleakQiao Yang2008-09-081-1/+2
| | | | | | | | request.extra_data is not freed if there is no extra_data in response or when there is some error happens in processing. This patch will free the buffer right after processing a request before sending back a response. (cherry picked from commit be6f12273f171a3eb1967d2299064e57d737f6a4) (cherry picked from commit 72865f5e4ff30861d58b928baaf7be3373301f37)
* Do proper error handling if the socket is closedVolker Lendecke2008-09-081-2/+8
| | | | | | | | | This is a step in fixing bug 5707. Thanks to Igor Galić <i.galic@brainsware.org> for reporting! Volker (cherry picked from commit 1558a5c1977b1f87600ec487238fa8db009f41fd)
* run "make idl" after after idl change "Handle arbitrary new PAC types"Michael Adam2008-09-082-16/+6
| | | | | Michael (cherry picked from commit cc54b4d74171d27e7a0b09aff0376804ac7ab69b)