1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

220 Commits

Author SHA1 Message Date
Andrew Bartlett
9ad1ddc793 Don't set zero length for the base64 decoded string (fixes swat auth).
Andrew Bartlett
(This used to be commit 7ab39cba6a97ddd0879dd968167fc7809f87de6e)
2003-04-02 00:17:03 +00:00
Andrew Bartlett
53beee9e56 (merge from HEAD)
NTLM Authentication:

- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
(This used to be commit ec071ca3dcbd3881dc08e6a8d7ac2ff0bcd57664)
2003-03-24 09:54:13 +00:00
Jim McDonough
6c6fb121cd use strnlen to prevent coredumps
(This used to be commit 5078436d83f0fdc568d6687809c7c70dea5fd382)
2003-03-19 20:50:56 +00:00
Jeremy Allison
84e99fe898 Merge mbp's HEAD changes.
Jeremy.
(This used to be commit da1271a95fce7fd217555fb161d4669d0b9b80e2)
2003-03-18 21:21:21 +00:00
Jeremy Allison
d332200c25 Merge in the developer string options from HEAD. We need to ensure 3.0
is as stable as possible in the string department and some pain now
will help later :-).
Jeremy.
(This used to be commit 86e3eddac698d90f4666b8492b4603a4efbbd67b)
2003-03-18 01:48:11 +00:00
Andrew Bartlett
467f1028f4 Merge from (earlier) HEAD - doxygen.
I'm not merging the current HEAD string stuff quite yet.
(This used to be commit 9b8d12e081462566043bb51e9c95605609572a54)
2003-03-17 22:42:01 +00:00
Andrew Bartlett
266ec4aac0 Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
(This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
2003-02-24 03:09:08 +00:00
Jim McDonough
17ec9642cd base64_decode() with heimdal libs, so I've renamed it base64_decode_inplace().
(This used to be commit d510ff85fb0dafddf3dea9412a09eeee6e70f0cb)
2003-02-18 23:17:59 +00:00
Andrew Tridgell
50edc1a831 merge from head
(This used to be commit fd3216dbcbaec7d64dd24fe2af6c4156935c47e9)
2003-02-07 04:11:36 +00:00
Andrew Bartlett
1cba0a7579 Merge from HEAD:
- NTLMSSP over SPENGO (sesssion-setup-and-x) cleanup and code refactor.
  - also consequential changes to the NTLMSSP and SPNEGO parsing functions
  - and the client code that uses the same functions
 - Add ntlm_auth, a NTLMSSP authentication interface for use by applications
   like Squid and Apache.
  - also consquential changes to use common code for base64 encode/decode.
 - Winbind changes to support ntlm_auth (I don't want this program to need
   to read smb.conf, instead getting all it's details over the pipe).
 - nmbd changes for fstrcat() instead of fstrcpy().

Andrew Bartlett
(This used to be commit fbb46da79cf322570a7e3318100c304bbf33409e)
2003-01-28 12:07:02 +00:00
Jeremy Allison
ff8ca2f88b Janitorial duty...
fix some undefined behaviour with increments in C. In theory a
compiler could have produced complete crap for this code. (tridge).
Jeremy.
(This used to be commit 2b4335f06265940582f389f48dc4f87f452a2703)
2003-01-17 06:40:12 +00:00
Gerald Carter
99cdb46208 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
(This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef)
2003-01-15 18:57:41 +00:00
Andrew Bartlett
aff13f53af Merge from HEAD - whitespace :-)
(This used to be commit 5fc90b6cf438480c9fcf8d01f0a319a52c5914cc)
2003-01-04 09:08:47 +00:00
Andrew Bartlett
863e9ca2c6 Merge from HEAD - mimir's new gencache based namecache code.
Andrew Bartlett
(This used to be commit f79324f730c400342f445c931b0d75ff756d7cc7)
2003-01-04 08:48:15 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
2003-01-03 08:28:12 +00:00
Andrew Bartlett
43059acb95 Merge from HEAD - add PRINTF_ATTRIBUTE to a few more functions.
(This used to be commit 9e5297131cc53d7161aa74566f147b98e1c27aaa)
2003-01-03 03:24:23 +00:00
Jeremy Allison
39c78bf516 Fixed auth module code. Added VALGRIND defines to reduce spurious warnings.
Jeremy.
(This used to be commit ec4ed45563f9d8e25fcfd88840944a90b3139c3e)
2002-12-11 23:54:40 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
2002-11-12 23:20:50 +00:00
Jeremy Allison
a0cddf2493 Added const. Anal formatting fixup.
Jeremy.
(This used to be commit 66531969dfe0935be2c9c4d89f5bba80d862a52f)
2002-10-02 19:12:14 +00:00
Gerald Carter
f2d1f19a66 syncing up with HEAD. Seems to be a lot of differences creeping in
(i ignored the new SAMBA stuff, but the rest of this looks like it should
have been merged already).
(This used to be commit 3de09e5cf1f667e410ee8b9516a956860ce7290f)
2002-10-01 18:26:00 +00:00
Andrew Bartlett
ad8a22e570 Updates from Samba HEAD:
- Fix segfaults in the 'net ads' commands when no password is provided
 - Readd --with-ldapsam for 2.2 compatability.  This conditionally compiles the
   old options, but the actual code is available on all ldap systems.
 - Fix shadow passwords (as per work with vl)
 - Fix sending plaintext passwords to unicode servers (again vl)
 - Add a bit of const to secrets.c functions
 - Fix some spelling and grammer by vance.
 - Document the -r option in smbgroupedit.

There are more changes in HEAD, I'm only merging the changes I've been involved
with.

Andrew Bartlett
(This used to be commit 83973c389355a5cc9ca74af467dfd8b5dabd2c8f)
2002-10-01 13:10:57 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
2002-08-17 17:00:51 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
5928c293ff added strndup() for systems that don't have it
(This used to be commit 7e92fb7453e4dbf1fe0c32c3dcc1e994cb95b5ea)
2002-04-11 15:27:22 +00:00
Andrew Tridgell
714518e550 this adds a completely new hash based mangling scheme
the hash for this scheme is *much* larger (approximately 31 bits) and
the code is written to be very fast, correctly handling multibyte
while not doing any actual multi-byte conversions in the vast majority
of cases

you can select this scheme using "mangling method = hash2", although I
may make it the default if it works out well.
(This used to be commit bb173c1a7e2408ced967ebac40b5e3f852ccd3a1)
2002-04-11 09:56:38 +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 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-30 06:08:46 +00:00
Simo Sorce
114eaabdcb minor fixes
(This used to be commit 04f492980b73800b60dde764fdeb43f2eab79624)
2002-01-25 00:35:14 +00:00
Martin Pool
fed604bfa3 Roll back PSTRING_SANCTIFY patch; just leave non-controversial type
and constness changes.
(This used to be commit cee0ec72746122c962e6c5278a736266a7f2c424)
2002-01-16 02:42:07 +00:00
Martin Pool
df3d5b3556 Add constness to filenames passed to functions.
(This used to be commit 8d106dc1f4a51112516d72ae68747ca6b5b904b7)
2002-01-15 01:37:12 +00:00
Andrew Tridgell
93d458c5f6 fixed warnings on irix and crash bug on big endian machines
(This used to be commit cc6c263993eaf0715f231fc80ca7e6e65694548b)
2001-12-20 10:02:30 +00:00
Andrew Tridgell
e051c2c430 make sid_binstring available without HAVE_ADS
(This used to be commit 4a6d29768665f71b72cf48ee34ee9a9c451232f6)
2001-12-10 00:39:01 +00:00
Simo Sorce
60906f657c fixed some bugs.
(This used to be commit 37edaeddce09193450b18b1b85aa41960cb39741)
2001-11-18 16:12:11 +00:00
Tim Potter
31b91bfe4e Removed unused variable.
(This used to be commit c8c7da237dc17d9b785bc15b9b569caeeb6d283e)
2001-11-14 01:38:01 +00:00
Simo Sorce
740d6f5dd6 a big one:
- old mangle code has gone, the new one based on tdb seem resonably ok
   probably the valid.dat table need to be updated to treat wild chars as
   invalid ones (work ok without it)
 - a LOT of new string manipulation function for unicode, they are somewhat
   tested but a review would not be bad
 - some new function I will need for the new unix_convert function I'm writing,
   this will be renamed filename_convert and use only unicode strings.
 - charconv, I attached a comment, if someone wnat to look if I'm right or
   just was hacking to late in the night to make a sane one :)

of course any bug is my responsibility an will be pleased to see patches if
you find any. :-)

Simo.
(This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)
2001-11-04 18:26:53 +00:00
Andrew Bartlett
6ab678d42b Small 'const' updates ahead of some AuthRewrite merging.
(This used to be commit 3b5e72bda3263c6bdf81dfface4fae4f06b71032)
2001-10-31 06:22:19 +00:00
Andrew Tridgell
9bcd133e9e switched over to a new method of handling uppercase/lowercase mappings
for unicode strings. The new method relies on 3 files that are mmap'd
at startup to provide the mapping tables. The upcase.dat and
lowcase.dat tables should be the same on all systems. The valid.dat
table says what characters are valid in 8.3 names, and differs between
systems. I'm committing the japanese valid.dat here, in future we need
some way of automatically installing and choosing a appropriate table.

This commit also adds my mini tdb based gettext replacement in
intl/lang_tdb.c. I have not enabled this yet and have not removed the
old gettext code as the new code is still being looked at by Monyo.

Right now the code assumes that the upcase.dat, lowcase.dat and
valid.dat files are installed in the Samba lib directory. That is not
a good choice, but I'll leave them there until we work out the new
install directory structure for Samba 3.0.

simo - please look at the isvalid_w() function and think about using
it in your new mangling code. That should be the final step to
correctly passing the chargen test code from monyo.
(This used to be commit 1c221994f118dd542a158b2db51e07d04d0e9314)
2001-10-03 12:18:20 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-10-02 04:29:50 +00:00
Simo Sorce
484a7c0341 move to SAFE_FREE()
(This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
2001-09-17 02:19:44 +00:00
Andrew Tridgell
6bd8340781 formatting fixes
(This used to be commit 67ca6cd8eb20621d3f5926e19822b479ac80cb9c)
2001-07-06 11:50:45 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04 07:36:09 +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 debb471267960e56005a741817ebd227ecfc512a)
2001-07-04 07:15:53 +00:00
Tim Potter
b3443597e2 Replaced memcpy() with memmove() to make safe_strcpy() safe for overlapping
source and destination.
(This used to be commit 30411d4004ce7062e73506d228ef402b99226eee)
2001-06-29 01:15:28 +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 e059fffd03a1382fb2b7059b6de369d9fc765a17)
2001-06-23 07:22:16 +00:00
Andrew Tridgell
91b8a8d1d2 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
(This used to be commit 674ee2f1d12b0afc164a9e9072758fd1c5e54df7)
2001-06-21 09:10:42 +00:00
Jeremy Allison
91febc38e3 Needs to be >=, not just >.
Jeremy.
(This used to be commit fa6a5bf94a3716c0554e2bcbe0eb4b0912f15604)
2001-05-10 23:55:33 +00:00
Jeremy Allison
e0f5d84e9d Fix for problem with "" string in trim_string(). Pointed out by Ben Winslow <rain@bluecherry.net>.
Jeremy.
(This used to be commit df2e306171f0a71af77dbaafc7ccbf78e27befb8)
2001-05-10 23:17:46 +00:00
Tim Potter
a36f9250e7 Preliminary merge of winbind into HEAD. Note that this compiles and links
but I haven't actually run it yet so it probably doesn't work.  (-:
(This used to be commit 59f95416b66db6df05289bde224de29c721978e5)
2001-05-07 04:32:40 +00:00
Jeremy Allison
78ac23f7e0 Added Darwin guess.
lib/util_str.c: Excellent patch from  Kenichi Okuyama <okuyamak@dd.iij4u.or.jp>
to speed up trim_string handling !
Jeremy.
(This used to be commit 4bb63ba615c735a298a6cbda2c87242695104978)
2001-04-15 22:21:04 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2001-04-08 20:22:39 +00:00
David O'Neill
23807f2b30 Changes from APPLIANCE_HEAD:
source/Makefile.in
        - changes to ctags and etags rules that somehow got lost along the way.

    source/include/proto.h
        - make proto

    source/smbd/sec_ctx.c
    source/smbd/password.c
        - merge debugs for debugging user groups and NT token stuff.

    source/lib/util_str.c
        - capitalise domain name returned from parse_domain_user()

    source/nsswitch/wb_client.c
        - fix broken conditional in debug statement.

    source/include/rpc_secdes.h
    source/include/rpc_spoolss.h
    source/printing/nt_printing.c
    source/lib/util_seaccess.c
        - fix printer permission bugs related to ACE masks for printers.
          This adds mapping of generic access rights to object specific
          rights for NT printers.  Still need to work out whether or not to
          ignore ACEs with certain flags set, though. See comments in
          util_seaccess.c:check_ace() for details.

    source/printing/nt_printing.c
    source/printing/printing.c
        - use PRINTER_ACCESS_ADMINISTER instead of JOB_ACCESS_ADMINISTER
          until we sort out printer/printjob permission stuff.
(This used to be commit 1dba9c5cd1e6389734c648f6903abcb7c8d5b2f0)
2001-01-04 19:27:08 +00:00