1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

62 Commits

Author SHA1 Message Date
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
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>
2012-07-18 15:07:23 +09:30
Stefan Metzmacher
e17fa58d6e s3:smbd: move global smbd_msg_state to smbXsrv_connection
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 25 11:01:27 CEST 2012 on sn-devel-104
2012-05-25 11:01:27 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Günther Deschner
165521e20d s3: only include smb profiling where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
2011-04-14 01:31:39 +02:00
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to 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
2011-03-24 01:47:26 +01:00
Volker Lendecke
aa362e8e68 s3: Protect against an invalid bcc in SMBsendtxt 2010-01-17 17:26:39 +01:00
Jeremy Allison
642101ac23 Remove all calls to reply_doserror - turn them into
correct reply_nterror calls. Next rename reply_doserror ->
reply_force_doserror and plumb in when NT_STATUS_DOS is
used.
Jeremy.
2009-12-21 11:05:25 -08:00
Jelmer Vernooij
4c32978d97 Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
the system one is broken.
2009-04-20 23:58:26 +02:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Volker Lendecke
af7cf4f992 Remove some direct inbuf references by adding smbreq_bufrem 2008-11-02 09:22:40 +01:00
Volker Lendecke
a31fab8156 Simplify params of srvstr_pull_buf_talloc()
Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc()
to srvstr_pull_req()
2008-11-02 09:22:40 +01:00
Volker Lendecke
7bdb571ec4 Remove a bunch of direct inbuf references by adding "buf" to smb_request 2008-11-01 19:41:08 +01:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
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 6b189dabc5)
2008-05-20 22:40:13 +02:00
Jeremy Allison
29562987c3 Now conn is part of smb_request, we don't need it as
an extra parameter. This cleans up quite a few places
we were passing it around without needing it.
Jeremy.
(This used to be commit 8f36def18e)
2008-01-04 15:37:24 -08:00
Volker Lendecke
22e329d37f Get rid of the msgbuf[1600]
(This used to be commit af22800791)
2007-12-09 17:03:33 +01:00
Jeremy Allison
052efa9a33 Remove last pstring from smbd/*.c
Jeremy.
(This used to be commit f1680bada9)
2007-11-13 12:51:31 -08:00
Volker Lendecke
c5572072e5 r24440: Convert the reply_sendXX functions to the new API
(This used to be commit a64bc31098)
2007-10-10 12:29:48 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
fcda5b5896 r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The next
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 836782b07b)
2007-10-10 12:23:49 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
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 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
ce61fb21d9 r16397: Fix Klocwork #11767 and drasticly simplify the
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 d357f8b335)
2007-10-10 11:18:52 -05:00
Jeremy Allison
d1f91f7c72 r12043: It's amazing the warnings you find when compiling on a 64-bit
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 c65b752604)
2007-10-10 11:05:42 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \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 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Alexander Bokovoy
94b88f8f26 r4704: Fix encoding while receiving of a message which was actually sent using STR_ASCII. Patch from Grigory Batalov <bga@altlinux.org>
(This used to be commit dddd572646)
2007-10-10 10:53:51 -05:00
Jeremy Allison
e3f5b54270 Restore the contract on all convert_stringXX() interfaces. Add a "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 7b96765c23)
2004-03-11 22:48:24 +00:00
Jeremy Allison
ecddae8bf0 Attempt to fix the charcnv issues causing nmbd to crash. If we get a failed
conversion simply copy as is. Also fixed the horrid malloc-twice-copy code
in the convert alloc path.
Jeremy.
(This used to be commit cfde7477fd)
2003-08-20 22:06:19 +00:00
Jelmer Vernooij
0b72dd8325 Patch from Samuel Thibault to convert messages from dos to unix charset
when sending(and vice versa when receiving).
(This used to be commit 5310447ec6)
2003-03-20 16:44:14 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jean-François Micouleau
e0066d2dd4 again an intrusive patch:
- 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 fef52c4b96)
2001-12-06 13:09:15 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
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 83d9896c1e)
2001-08-27 08:19:43 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
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 debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
37eb0d6c74 Added other_safe_chars to alpha_strcpy(). Needs testing but is a better
fix for the problem.
Jeremy.
(This used to be commit e059fffd03)
2001-06-23 07:22:16 +00:00
Jeremy Allison
fda0f83d75 Following info from TAKAHASHI Motonobu <monyo@samba.gr.jp>,
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 244aec8ea6)
2001-06-21 01:01:15 +00:00
Jeremy Allison
2ef68c7e92 Merge of Andrew's changes in 2.2.
Jeremy.
(This used to be commit fc76681812)
2001-04-13 19:12:06 +00:00
Jeremy Allison
50e78a9ac8 As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
(This used to be commit e7d59d6de8)
2001-04-13 00:37:00 +00:00
Jeremy Allison
6578fd8742 To stop people complaining about the mktemp call, move it into lib/util.c. 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 9b32b8a8cf)
2001-04-11 23:19:08 +00:00
Andrew Tridgell
376a44c81d converted the smb messaging code to unicode
(This used to be commit 54bde1b3ae)
2001-03-14 11:55:08 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Herb Lewis
8719c27726 changes to sync with 2.2. tree
.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 bbb24daa25)
2000-10-11 05:31:39 +00:00
Andrew Tridgell
49a0e6d598 more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
(This used to be commit 92109d7b3c)
2000-05-10 10:41:59 +00:00
Jeremy Allison
451dcb3351 Fixed code page conversions of messages outgoing/incoming.
Jeremy.
(This used to be commit 84b045cbc8)
2000-01-27 01:09:21 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Jeremy Allison
768761820e Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.
Tidied up some of the mess (no other word for it). Still doesn't
compile cleanly. There are calls with incorrect parameters that
don't seem to be doing the right thing.

This code still needs surgery :-(.

Jeremy.
(This used to be commit 18ff93a9ab)
1998-11-17 20:50:07 +00:00
Andrew Tridgell
b9623ab59e this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
(This used to be commit c7ee025ead)
1998-08-14 17:38:29 +00:00