summaryrefslogtreecommitdiff
path: root/source3/utils/smbfilter.c
Commit message (Collapse)AuthorAgeFilesLines
* libsmb: Give namequery.c its own headerVolker Lendecke2018-04-111-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* source3/utils/smbfilter.c set socket close on execGary Lockyer2017-12-181-0/+1
| | | | | | | | | | Set SOCKET_CLOEXEC on the sockets returned by accept. This ensures that the socket is unavailable to any child process created by system(). Making it harder for malicious code to set up a command channel, as seen in the exploit for CVE-2015-0240 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:smbfilter: fix O3 error unused result of system()Michael Adam2016-05-131-1/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* lib: Move sys_rw* to lib/utilVolker Lendecke2015-10-131-1/+1
| | | | | | | genrand.c will require it soon Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: load_case_tables() -> smb_init_locale()Volker Lendecke2015-03-241-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix the developer O3 buildVolker Lendecke2015-02-251-1/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104
* lib: Split out write_data[_iov]Volker Lendecke2014-12-071-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:utils: check the status of open_socket_out() correctly in smbfilter.cStefan Metzmacher2014-04-021-3/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils: use char packet[] in smbfilter.c to avoid warningsStefan Metzmacher2014-04-021-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils/smbfilter: use a local variable for the packet bufferStefan Metzmacher2014-03-051-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Rename obscure defined constants.Christopher R. Hertel (crh)2012-02-161-2/+2
| | | | | | | | | | | | | | | Replaced the undescriptive SMB_PORT1 and SMB_PORT2 defined constants with the slightly more descriptive names NBT_SMB_PORT and TCP_SMB_PORT. Also replaced several hard-coded references to the well-known port numbers (139 and 445, respectively) as appropriate. Small changes to clarify some comments regarding the two transport types. Signed-off-by: Simo Sorce <idra@samba.org> Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Thu Feb 16 08:29:41 CET 2012 on sn-devel-104
* s3:smbfilter: use lp_load_global()Michael Adam2011-07-281-1/+1
|
* s3-libsmb: put namequery headers to nmblib.hGünther Deschner2011-03-301-0/+1
| | | | | | | We might find a better name for it and merge other namequery related things as well here... Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: Eliminate sys_select_intr from smbfilterVolker Lendecke2011-02-281-17/+43
|
* s3: Fix some nonempty blank lines and some typosVolker Lendecke2011-02-091-7/+7
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Feb 9 00:01:45 CET 2011 on sn-devel-104
* s3-utils: Fixed possible resource leak in smbfilter.Andreas Schneider2011-01-261-0/+1
| | | | s3-utils: Fixed possible resource leak in smbfilter.
* s3-debug Impove setup_logging() to specify logging to stderrAndrew Bartlett2010-11-021-1/+1
| | | | | | | | This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett
* samba: share select wrappers.Günther Deschner2010-10-011-0/+1
| | | | Guenther
* Fix bug #7698 - Assert causes smbd to panic on invalid NetBIOS session request.Jeremy Allison2010-09-261-9/+32
| | | | | | | | | | | | | | Found by the CodeNomicon test suites at the SNIA plugfest. http://www.codenomicon.com/ If an invalid NetBIOS session request is received the code in name_len() in libsmb/nmblib.c can hit an assert. Re-write name_len() and name_extract() to use "buf/len" pairs and always limit reads. Jeremy.
* Added prefer_ipv4 bool parameter to resolve_name().Jeremy Allison2009-07-281-1/+1
| | | | | | | | | | W2K3 DC's can have IPv6 addresses but won't serve krb5/ldap or cldap on those addresses. Make sure when we're asking for DC's we prefer IPv4. If you have an IPv6-only network this prioritizing code will be a no-op. And if you have a mixed network then you need to prioritize IPv4 due to W2K3 DC's. Jeremy.
* Convert name_mangle() to use tallocVolker Lendecke2009-02-241-2/+9
|
* Fix the build of smbfilterVolker Lendecke2009-01-041-2/+3
|
* open_socket_out is always used with SOCK_STREAM, remove argument "type"Volker Lendecke2009-01-031-1/+1
|
* s3: Change sockaddr util function names for consistencyTim Prouty2008-12-031-1/+1
| | | | Also eliminates name conflicts with OneFS system libraries
* Security fix for CVE-2008-1105: Boundary failure when parsing SMB responsesJeremy Allison2008-05-281-2/+4
| | | | | | can result in a buffer overrun. Jeremy. (This used to be commit 23b825e9d2c74c5b940cf4d3aa56c18692259972)
* Convert receive_smb_raw to NTSTATUSVolker Lendecke2008-02-021-2/+6
| | | | (This used to be commit ba771bd858602452a9e58c3aab1336f2ac8a25ef)
* Fix the build.Jeremy Allison2008-01-041-2/+2
| | | | | Jeremy. (This used to be commit 25a0084af5978cc11cf4e83a641bc57e0e64eb89)
* Refactor the crypto code after a very helpful conversationJeremy Allison2008-01-041-2/+26
| | | | | | | with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy. (This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
* Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison2007-12-101-1/+1
| | | | | | | them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
* Getting to the home stretch for elimination of pstrings...Jeremy Allison2007-12-031-5/+5
| | | | | Jeremy. (This used to be commit 041163551194102ca67fef52c57d87020a1d09bc)
* Ensure we null out the address correctly.Jeremy Allison2007-11-051-1/+2
| | | | | Jeremy. (This used to be commit e1fcd851ab38165eb0e959cdc02ff067614f8b28)
* Fix another segfault and make smbfilter run again.Michael Adam2007-11-061-1/+3
| | | | | | | | This fix is not complete yet (loop after "client closed connection") but at least it starts again... Micheal (This used to be commit e2ffc6053dc9453fc49545db47374ed42e8efecd)
* Fix a segfault.Michael Adam2007-11-061-0/+2
| | | | | Michael (This used to be commit 98225a075226e78f7ce64787dd29122fda3d6924)
* Try to fix the build. There was one forgotten callerMichael Adam2007-11-061-2/+2
| | | | | | | of receive_smb. Jeremy: please check! Michael (This used to be commit 1f0fcc3e4ef7526cbf0a5a5fc96708238d0efdeb)
* Fix a few more sockaddr -> sockaddr_storgage.Jeremy Allison2007-10-261-3/+3
| | | | | Jeremy. (This used to be commit 4b3635d6bc1bd5e4135ef208dff052e1d9b58a12)
* one more struct in_addr => struct sockaddr_storageStefan Metzmacher2007-10-261-6/+12
| | | | | | | jra: please check this... metze (This used to be commit cecc8075513a3cca17aeab0c88ae05ed13a07ee3)
* r24943: Some stackframesVolker Lendecke2007-10-101-0/+2
| | | | (This used to be commit cddb9f11d5fafcd3797cb242775c37f0c04d4f15)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500Derrell Lipman2007-10-101-1/+1
| | | | | | | | | | | | | lp_load() could not be called multiple times to modify parameter settings based on reading from multiple configuration settings. Each time, it initialized all of the settings back to their defaults before reading the specified configuration file. This patch adds a parameter to lp_load() specifying whether the settings should be initialized. It does, however, still force the settings to be initialized the first time, even if the request was to not initialize them. (Not doing so could wreak havoc due to uninitialized values.) (This used to be commit f2a24de769d1b2266e576597c57a8e3b1e2a2b51)
* r4849: * finish SeAddUsers support in srv_samr_nt.cGerald Carter2007-10-101-2/+2
| | | | | | | | | | * define some const SE_PRIV structure for use when you need a SE_PRIV* to a privilege * fix an annoying compiler warngin in smbfilter.c * translate SIDs to names in 'net rpc rights list accounts' * fix a seg fault in cli_lsa_enum_account_rights caused by me forgetting the precedence of * vs. [] (This used to be commit d25fc84bc2b14da9fcc0f3c8d7baeca83f0ea708)
* Final round of printf warnings fixes for the moment.Tim Potter2003-11-061-1/+1
| | | | (This used to be commit 0519a7022b4979c0e8ddd4907f4b858a59299c06)
* Reverse previous patch from Stefan and me after comments by Andrew BartlettJelmer Vernooij2003-05-101-2/+0
| | | | (This used to be commit d817eaf0ecca2d878ab1ffcf7a747a02d71c811e)
* Patch from metze and me that adds dummy smb_register_*() functions soJelmer Vernooij2003-05-101-0/+2
| | | | | | that is now possible to, for example, load a module which contains an auth method into a binary without the auth/ subsystem built in. (This used to be commit 74d9ecfe2dd7364643d32acb62ade957bd71cd0d)
* Merge a bunch of trivial changes from HEAD. The difference remainingTim Potter2002-11-291-1/+0
| | | | | | | | | | should actual functional differences between HEAD and 3.0. - Mostly reformatting - Removal of unecessary #include "smb.h" - Merge of dyn_DRIVERFILE removal - Silly bug fix for python code (This used to be commit d3998307adc50ba50defe610cb656c73799ae3b9)
* Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison2002-01-311-2/+2
| | | | | | | processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy. (This used to be commit 3af16ade173cac24c1ac5eff4a36b439f16ac036)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Removed TimeInit() call from every client program (except for one placeTim Potter2001-11-231-2/+0
| | | | | | in smbd/process.c where the timezone is reinitialised. Was replaced with check for a static is_initialised boolean. (This used to be commit 8fc772c9e5770cd3a8857670214dcff033ebae32)
* Store some path names in global variables initialized to configureMartin Pool2001-11-191-1/+1
| | | | | default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)