summaryrefslogtreecommitdiffstats
path: root/source3/smbd/message.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd: use req->xconn in message.cStefan Metzmacher2014-08-061-4/+3
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: move xconn->msg_state to xconn->smb1.msg_stateStefan Metzmacher2014-08-061-17/+21
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: let srvstr_pull_req_talloc() take 'const uint8_t *src'Stefan Metzmacher2014-04-021-5/+5
| | | | | | | | | | This is the correct thing to do the smb request buffer contains just bytes (uint8_t). It also avoids strange casting in the callers. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* param: rename lp function and variable from "msg_command" to "message_command"Garming Sam2014-02-071-6/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Make sure to set umask() before calling mkstemp().Andreas Schneider2013-03-061-0/+4
| | | | | | | Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-6/+6
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3:smbd: move global smbd_msg_state to smbXsrv_connectionStefan Metzmacher2012-05-251-15/+19
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri May 25 11:01:27 CEST 2012 on sn-devel-104
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett2011-06-091-1/+1
| | | | | | | Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
* s3: only include smb profiling where needed.Günther Deschner2011-04-141-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell2011-03-241-1/+1
| | | | | | | | | convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
* s3: Protect against an invalid bcc in SMBsendtxtVolker Lendecke2010-01-171-1/+1
|
* Remove all calls to reply_doserror - turn them intoJeremy Allison2009-12-211-4/+4
| | | | | | | correct reply_nterror calls. Next rename reply_doserror -> reply_force_doserror and plumb in when NT_STATUS_DOS is used. Jeremy.
* Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() ifJelmer Vernooij2009-04-201-1/+1
| | | | the system one is broken.
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-2/+1
| | | | | | The goal is to move all this variables into a big context structure. metze
* Remove some direct inbuf references by adding smbreq_bufremVolker Lendecke2008-11-021-2/+2
|
* Simplify params of srvstr_pull_buf_talloc()Volker Lendecke2008-11-021-12/+10
| | | | | Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc() to srvstr_pull_req()
* Remove a bunch of direct inbuf references by adding "buf" to smb_requestVolker Lendecke2008-11-011-7/+7
|
* Cleanup size_t return values in callers of convert_string_allocateTim Prouty2008-05-201-7/+6
| | | | | | This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure. (This used to be commit 6b189dabc562d86dcaa685419d0cb6ea276f100d)
* Now conn is part of smb_request, we don't need it asJeremy Allison2008-01-041-4/+4
| | | | | | | an extra parameter. This cleans up quite a few places we were passing it around without needing it. Jeremy. (This used to be commit 8f36def18e9f980e8db522e1de41e80cfd5f466e)
* Get rid of the msgbuf[1600]Volker Lendecke2007-12-091-98/+132
| | | | (This used to be commit af228007915cc8bb65fa7968da25a1a36004bc22)
* Remove last pstring from smbd/*.cJeremy Allison2007-11-131-11/+40
| | | | | Jeremy. (This used to be commit f1680bada913af4eaf5c0d686983018d6c8b3e5f)
* r24440: Convert the reply_sendXX functions to the new APIVolker Lendecke2007-10-101-31/+31
| | | | (This used to be commit a64bc31098de8694b79eeafd3a226cf519700707)
* 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)
* r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The nextVolker Lendecke2007-10-101-4/+8
| | | | | | | checkin will pull this up to srvstr_get_path. At that point we can get more independent of the inbuf, the base_ptr in pull_string will only be used to satisfy UCS2 alignment constraints. (This used to be commit 836782b07bf133e9b2598c4a089f1c810e4c7754)
* r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison2007-10-101-4/+4
| | | | | | | | to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy. (This used to be commit 2d80a96120a5fe2fe726f00746d36d85044c4bdb)
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-1/+2
| | | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
* r16397: Fix Klocwork #11767 and drasticly simplify theJeremy Allison2007-10-101-153/+152
| | | | | | | | | logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). Jeremy. (This used to be commit d357f8b33594472ffa78d0a112accccc2a8b1fe7)
* r12043: It's amazing the warnings you find when compiling on a 64-bitJeremy Allison2007-10-101-1/+1
| | | | | | | | | | | | box with gcc4 and -O6... Fix a bunch of C99 dereferencing type-punned pointer will break strict-aliasing rules errors. Also added prs_int32 (not uint32...) as it's needed in one place. Find places where prs_uint32 was being used to marshall/unmarshall a time_t (a big no no on 64-bits). More warning fixes to come. Thanks to Volker for nudging me to compile like this. Jeremy. (This used to be commit c65b752604f8f58abc4e7ae8514dc2c7f086271c)
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-2/+9
| | | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
* r4704: Fix encoding while receiving of a message which was actually sent ↵Alexander Bokovoy2007-10-101-4/+4
| | | | | | using STR_ASCII. Patch from Grigory Batalov <bga@altlinux.org> (This used to be commit dddd5726462c13374788713ad5ddcbdf9ee7b439)
* Restore the contract on all convert_stringXX() interfaces. Add a ↵Jeremy Allison2004-03-111-1/+1
| | | | | | | | | | "allow_bad_conv" boolean parameter that allows broken iconv conversions to work. Gets rid of the nasty errno checks in mangle_hash2 and check_path_syntax and allows correct return code checking. Jeremy. (This used to be commit 7b96765c23637613f079d37566d95d5edd511f05)
* Attempt to fix the charcnv issues causing nmbd to crash. If we get a failedJeremy Allison2003-08-201-1/+1
| | | | | | | conversion simply copy as is. Also fixed the horrid malloc-twice-copy code in the convert alloc path. Jeremy. (This used to be commit cfde7477fd12caef943a9422b52174438092a135)
* Patch from Samuel Thibault to convert messages from dos to unix charsetJelmer Vernooij2003-03-201-9/+18
| | | | | when sending(and vice versa when receiving). (This used to be commit 5310447ec6e0df1c000e3ee14572f5b7fee31f28)
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-5/+5
| | | | (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
* 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)
* again an intrusive patch:Jean-François Micouleau2001-12-061-1/+3
| | | | | | | | | | | | | | | | - removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the definition of standard_sub_basic() to cope with that. - removed the smb.conf: 'domain admin group' and 'domain guest group' parameters ! We're not playing anymore with the user's group RIDs ! - in get_domain_user_groups(), if the user's gid is a group, put it first in the group RID list. I just have to write an HOWTO now ;-) J.F. (This used to be commit fef52c4b96c987115fb1818c00c2352c67790e50)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-3/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-4/+4
| | | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night (This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518)
* The big character set handling changeover!Andrew Tridgell2001-07-041-5/+4
| | | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
* Added other_safe_chars to alpha_strcpy(). Needs testing but is a betterJeremy Allison2001-06-231-2/+2
| | | | | | fix for the problem. Jeremy. (This used to be commit e059fffd03a1382fb2b7059b6de369d9fc765a17)
* Following info from TAKAHASHI Motonobu <monyo@samba.gr.jp>,Jeremy Allison2001-06-211-3/+2
| | | | | | | Samba Users Group Japan, ensure that we don't use dos_to_unix(xx,True), but always use dos_to_unix(xx,False) to prevent overwriting. Jeremy. (This used to be commit 244aec8ea623fec828add3ab09c5003bf32bd5c7)
* Merge of Andrew's changes in 2.2.Jeremy Allison2001-04-131-1/+1
| | | | | Jeremy. (This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
* As Andrew suggested, make smbrun return a fd for a deleted file which can thenJeremy Allison2001-04-131-1/+1
| | | | | | be read. Jeremy. (This used to be commit e7d59d6de89a5fdd201e4b5c6072dab08b1519db)
* To stop people complaining about the mktemp call, move it into lib/util.c. ↵Jeremy Allison2001-04-111-6/+5
| | | | | | | | | Thanks to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke XFS ACL code. Jeremy. (This used to be commit 9b32b8a8cfc8ddb93c14d5581f433d2e93f89ed2)
* converted the smb messaging code to unicodeAndrew Tridgell2001-03-141-17/+15
| | | | (This used to be commit 54bde1b3aec829ba55b8a6c946424fdaf38803a9)
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-4/+0
| | | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
* changes to sync with 2.2. treeHerb Lewis2000-10-111-4/+20
| | | | | | | | | | | | | | | | | | .cvsignore remove config.h - not in this directory include/profile.h profile changes lib/messages.c added message to return debug level libsmb/clierror.c cast to get rid of compiler warning libsmb/smbencrypt.c cast to get rid of compiler warning profile/profile.c add flush profile stats changes for profile struct rpc_parse/parse_samr.c fix for compiler warning rpc_server/srv_samr.c cast to get rid of compiler warning smbd/ipc.c profile stats message.c profile stats smbd/negprot.c profile stats smbd/nttrans.c profile stats smbd/trans2.c profile stats utils/smbcontrol.c new flush stats command (This used to be commit bbb24daa25dca4e4b6b1f8942cd84ee3aa1bed8e)