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

12510 Commits

Author SHA1 Message Date
Jeremy Allison
16e6d22408 Fix valgrind-found read of uninit variable (ensure length is right).
Jeremy.
(This used to be commit 6fc0e529f7)
2003-09-08 21:26:30 +00:00
Jeremy Allison
07c90e499e Tidy up some formatting. Get ready for allowing bad password lockout. (based
on a patch posted from Richard Renard <rrenard@idealx.com>.
Jeremy.
(This used to be commit abf54b58e9)
2003-09-08 20:42:33 +00:00
Jeremy Allison
5daacc87b5 Protect against core dump if ioctl for print job sends invalid fid. Found
by Iskantharajah T <is@tracetec.com.my>.
Jeremy.
(This used to be commit a9f9dd71da)
2003-09-08 20:27:28 +00:00
Jeremy Allison
206d0f4156 Fix for incorrect error message - found by Alex Davis <alex14641@yahoo.com>.
Jeremy.
(This used to be commit 28631ef23f)
2003-09-08 18:41:42 +00:00
Gerald Carter
e56192d0cf make sure we substitute basic variables in read/write list
(This used to be commit 52bea54d35)
2003-09-08 15:24:01 +00:00
Gerald Carter
7a0b58a012 fix compile error on HP-UX 10.20
(This used to be commit 15d53fd53c)
2003-09-08 14:00:51 +00:00
Gerald Carter
154451465b fix valgrind errors; don't access cli_state pointer after it has been shutdown
(This used to be commit 02ae82fb3f)
2003-09-08 13:53:19 +00:00
Tim Potter
66abd44c6d Set PICFLAG="-fPIC" for gcc under HPUX.
(This used to be commit 7f2533207e)
2003-09-08 06:30:49 +00:00
Tim Potter
f87bd75423 Fix for bug #299.
There was some confusion over dynamically allocated lists of pointers
(i.e you have to make space for the list of pointers and what they are
pointing too) in the memory buffer passed in from libc.

Valgrind is much happer now and as a bonus there is no segfault.
(This used to be commit 7907c44414)
2003-09-08 05:51:57 +00:00
Tim Potter
605281ef4b Rename FOOLIBS to FOO_LIBS to be consistent with the rest of the
library variable names.
(This used to be commit 9b0b0256a8)
2003-09-08 02:48:06 +00:00
Tim Potter
b42500299c Fix for bug #334. We don't unmarshall the trusted domain or secrets
info delta correctly and thus crash when doing a net rpc samdump.

The easiest thing at the moment it to comment out these functions as
they seriously don't correspond with reality (netmon/ethereal) and the
data in the containers aren't used anyway.
(This used to be commit 695aa39c5d)
2003-09-08 02:13:38 +00:00
Tim Potter
5660c449ef Reformat debug.
(This used to be commit 3aab7a3bc7)
2003-09-08 01:28:48 +00:00
Tim Potter
678de276cd When enumerating dfs shares loop from 0 to lp_numservices() instead of
relying on lp_servicename(n) to return an empty string for invalid
service numbers.  For some reason it is returning NULL now.

Fixes bug 403.
(This used to be commit cebb2abd2e)
2003-09-08 00:55:29 +00:00
Volker Lendecke
1c38391c70 Nobody complained on the team-list, so commit it ...
This implements some kind of improved AFS support for Samba on Linux with
OpenAFS 1.2.10. ./configure --with-fake-kaserver assumes that you have
OpenAFS on your machine. To use this, you have to put the AFS server's KeyFile
into secrets.tdb with 'net afskey'. If this is done, on each tree connect
smbd creates a Kerberos V4 ticket suitable for use by the AFS client and
gives it to the kernel via the AFS syscall. This is meant to be very
light-weight, so I did not link in a whole lot of libraries to be more
platform-independent using the ka_SetToken function call.

Volker
(This used to be commit 5775690ee8)
2003-09-07 16:36:13 +00:00
Jeremy Allison
c4b69a9ca1 Use djb-algorithm string hash - faster than the tdb one we used to use.
Jeremy.
(This used to be commit f094555ed9)
2003-09-06 21:43:23 +00:00
Gerald Carter
dc7ea5851c finish off bug 282. AAdd extra checks for pointers after
ads_search_XXX() calls.
(This used to be commit 74c02e5fbc)
2003-09-06 20:00:16 +00:00
Jeremy Allison
6007eae339 Change some internal interfaces to cause the hash (which is *expensive*)
to be calculated less often. No change to external interface.
Jeremy.
(This used to be commit 155c9ce666)
2003-09-06 19:59:12 +00:00
Gerald Carter
5bd4af1302 fix bug 382: make sure to free and reset the cli_state pointer after flushing connections in winbindd_pam_auth[_crap]()
(This used to be commit 60c8796edd)
2003-09-06 19:49:59 +00:00
Gerald Carter
c913fc0581 address bug #359. Andrew B's patch for implementing client
portion of NTLMv2 key exchange.  Also revert the default for
'client ntlmv2 auth' to no.  This caused no ends of grief in
different cases.

And based on abartlet's mail....

> All I care about at this point is that we use NTLMv2
> in our client code when connecting to a server that
> supports it.

There is *no* way to tell this.  The server can't tell us, because it
doesn't know what it's DC supports.  The DC can't tell us, because it
doesn't know what the trusted DC supports.  One DC might be Win2k, and
the PDC could be an older NT4.
(This used to be commit fe585d49cc)
2003-09-06 19:23:24 +00:00
Gerald Carter
d5bef211d0 revert retry loops in winbindd_ads as abartket points out, we
already have ads_search_retry() for this.  However, neither
domain_sid() nor sequence_nunber() used this function.  So modify
them to us ads_do_search_retry() so we can specify the base search
DN and scope.
(This used to be commit 89f6adf830)
2003-09-06 18:02:19 +00:00
Jelmer Vernooij
14b438e90a Only set sids when they're retrurned by the MySQL query
(This used to be commit 9a603f6f07)
2003-09-06 12:21:08 +00:00
Jeremy Allison
966b0fc7c9 More cachegrind tuning, plus fix an error message.
Jeremy.
(This used to be commit 8cb9ec5d53)
2003-09-05 21:30:50 +00:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Gerald Carter
7544b0c773 fixes for ads domain membership when only the realm is defined in
smb.conf

Fixes to ensure we work with disable netbios = yes
(This used to be commit 3913e43724)
2003-09-05 17:57:45 +00:00
Gerald Carter
cadff24182 revert the change from r1.414 in HEAD that removed the
ability to use variables in paths for the [homes] service.
(This used to be commit 8fd13b6310)
2003-09-05 14:53:10 +00:00
Gerald Carter
1f32535d60 fix some output formatting
(This used to be commit 0283b0152e)
2003-09-05 13:25:49 +00:00
Gerald Carter
2d5cf1d451 reformatting
(This used to be commit 5c3094ee55)
2003-09-05 13:21:35 +00:00
Gerald Carter
605caa4172 fix some problems with the findsmb script due to changes in smbclient & nmblookup
(This used to be commit 50bb063f3b)
2003-09-05 13:07:41 +00:00
Volker Lendecke
f0441479f4 Very weird. On my SLES8 installation ntlm_auth would give missing
kerberos symbols unless I do the same as smbd does. It does not hurt
on my debian, so simply give a pointer to LDAPLIBS as well.

Volker
(This used to be commit 353d527291)
2003-09-05 09:36:10 +00:00
Tim Potter
25f66c810a Fix for bug 282 that didn't get checked in.
(This used to be commit e3f5afb831)
2003-09-05 05:57:24 +00:00
Gerald Carter
5a74bdd7aa fix bug 397: use a variant of alloc_sub_basic() for string lists.
(This used to be commit 62d5611df0)
2003-09-05 05:32:32 +00:00
Gerald Carter
4fd8542cf5 should fix bug 364 & 311: Retry patch based on suggestion from
Ken Cross.  Sometimes ads conenction get stale but we don't know
they are dead until we try them. This patch may need some optimization
after people bang on it for a while.
(This used to be commit 7021cf63a4)
2003-09-05 04:46:44 +00:00
Tim Potter
e414564eb6 Fix for bug #73. Name types can be specified using name#type notation.
Also added shortcut so that 'net lookup foo#1b' works.
(This used to be commit f38679201e)
2003-09-05 04:40:10 +00:00
Tim Potter
5bbdf6a5d0 Move $(KRBCLIENT_OBJ) to libnss_wins PICOBJ variable so it is converted to
relocatable form.

Added a comment about this in the hope that it won't happen again.

Renamed PAM_WINBIND_OBJ to PAM_WINBIND_PICOBJ to make it a bit clearer.
(This used to be commit 04797e12d8)
2003-09-05 03:05:37 +00:00
Jeremy Allison
ff78c21f51 Hand optimisatinos for strrchr_m using the properties we know about MB
character sets and how we use this call.
Jeremy.
(This used to be commit a9709700ee)
2003-09-05 01:33:22 +00:00
Tim Potter
2dacf5e00c Return 0 DFS links instead of -1 when dfs support is not enabled.
Possible fix for bug 403.
(This used to be commit 6babab93ff)
2003-09-05 00:55:44 +00:00
Tim Potter
7444f0fc7b Removed {OLD,NEW}_NTDOMAIN cruft from mkproto.awk
(This used to be commit 061decb608)
2003-09-04 23:55:44 +00:00
Jeremy Allison
08c3907f4e Fastpath strchr_m for ASCII.
Jeremy.
(This used to be commit b3176f2ec2)
2003-09-04 23:26:13 +00:00
Jeremy Allison
0e8c2a4133 More hand-tuning of the fastpath. Don't do strlen() when we're doing
to walk to the end anyway.
Jeremy.
(This used to be commit 467cafdb1f)
2003-09-04 23:03:58 +00:00
Gerald Carter
bf0f3be29d Check in Andrew's fix for bug #305 (always use lp_realm() )
Also make sure thet ads_startup uses lp_realm instead of
just relying on the workgroup name.  Fixes bug in net ads join
when the workgroup defaults to "WORKGROUP" and we ignore the
realm name.
(This used to be commit b1763ace4e)
2003-09-04 19:45:04 +00:00
Jeremy Allison
22831019dc Remove convert_string_internal completely from fast path when processing
NBENCH calls. Requires fixed buffer size for strdup_upper().
Jeremy.
(This used to be commit e98fbfaf38)
2003-09-04 18:40:55 +00:00
Jeremy Allison
3c1c2ddf9a Fix UNIX passwd sync properly. I've finally understood
the as_root parameter has bugger all to do with who you *currently*
are, and everything to do with who you run the script as. Doh !
Jeremy.
(This used to be commit 17a241d9f7)
2003-09-04 18:02:17 +00:00
Tim Potter
d5bd98dd9a More FreeBSD PAM compile fixes. Don't redefine PAM_AUTHTOK_RECOVER_ERR
if it already exists.  FreeBSD 4.8 doesn't need the redefinition, 5.0 does.
(This used to be commit 4a3727b03b)
2003-09-04 03:28:40 +00:00
Tim Potter
c7accf6a72 Produce an error if --with-pam_smbpass is specified and we can't
find libpam or security/pam_appl.h

Also change the warnings when we can't do --with-pam_smbpass when
is was requested to errors.
(This used to be commit fe3fb58623)
2003-09-04 02:23:43 +00:00
Tim Potter
fb638ddf99 Quieten level 0 debug when probing for modules. We shouldn't display so loud
an error when a smb_probe_module() fails.  Also tidy up debugs a bit.

Bug 375.
(This used to be commit 24a1720472)
2003-09-04 02:02:26 +00:00
Jeremy Allison
245fbf7efb Used cachegrind to track down some bottlenecks.
Removed calls to clobber_region when not compiling with developer as
they were hiding speed problems.
Added fast path to convert_string() when dealing with ascii -> ascii,
ucs2-le to ascii and ascii to ucs2-le with values <= 0x7F. This
gives a speedup of 22% on my nbench tests.
Next I will do this on convert_string_allocate.
Jeremy.
(This used to be commit ef140d15ea)
2003-09-04 01:12:39 +00:00
Tim Potter
7da5c6a0e7 Produce an error if --with-pam is specified but no PAM headers can be
found.
(This used to be commit dc43c2dd1b)
2003-09-04 00:51:50 +00:00
Jeremy Allison
9c570af333 Fix up overlapping memcpy -> memmove found by valgrind.
Jeremy.
(This used to be commit e0c1460c6b)
2003-09-03 00:56:43 +00:00
Jim McDonough
d517c1d613 Try to add memory keytab support. It also includes much of the generic
keytab support code, but it won't be enabled until we add that to smb.conf.
Adapted from the work of Guenther Deschner (gd@suse.com).

Please hammer on this...
(This used to be commit a26fa5bee2)
2003-09-03 00:45:15 +00:00
Jeremy Allison
a7e8e39b91 Proposed patch for #308. Needs testing.
Jeremy
(This used to be commit e2b73477e7)
2003-09-02 23:58:39 +00:00
Jim McDonough
7d378e9a11 Disable rc4-hmac on broken heimdal setups. Pre-0.7 heimdal (or at least up
to a very recent snapshot) has arcfour-hmac code that doesn't work with
windows.  Love suggested detecting it via the existence of KEYTYPE_ARCFOUR_56
which only exists in working versions.
(This used to be commit e039a61e51)
2003-09-02 18:31:41 +00:00
Jim McDonough
409c6d1407 Check for support for in-memory keytabs, which are needed to make heimdal
work properly.  MIT does not support them, so this check will be used to
decide whether to use them.  First part of fixing bug #372.
(This used to be commit 85737fc937)
2003-09-02 17:02:09 +00:00
Tim Potter
ea7b4b6c32 Fix for bug 261. Create a configure #define for FreeBSD and a check in
nsswitch/pam_winbind.h so we can compile properly on this platform.
(This used to be commit 75411005fc)
2003-09-02 00:09:31 +00:00
Jeremy Allison
9b276fc77f Fix comment strings to 43 bytes as per spec.
Jeremy.
(This used to be commit f1ec43fae4)
2003-09-01 18:28:09 +00:00
Alexander Bokovoy
39abb5cacc Proper fix for #380 -- use different algorithm to generate codepages
source code which allows to take gaps into account thus making unneccessary
extended [index] = value, syntax in to_ucs2 array
(This used to be commit 4ab08a4bb8)
2003-09-01 11:33:42 +00:00
Alexander Bokovoy
bce1fcd76b Fix CP437 and CP850 syntax for old compilers removing ANSI C99-specifics
(This used to be commit 61c671bd69)
2003-09-01 11:26:57 +00:00
Tim Potter
0869073b7b Fix bug 342. Short version of --add now -a instead of -A.
(This used to be commit 233568dd6b)
2003-09-01 10:43:21 +00:00
Tim Potter
0548123153 We don't need to #include memory.h here. It's a BSD'ism and just includes
string.h anyways.
(This used to be commit 71034cede8)
2003-08-31 23:58:55 +00:00
Alexander Bokovoy
01e9f9788c Remove cap_set_quota as it is the same as default one
(This used to be commit e123f1a8c8)
2003-08-29 09:24:24 +00:00
Steve French
78e75d4f6c Update mount helper to take synonyms for file_mode and dir_mode (fmask and dmask)
(This used to be commit 89a0e97094)
2003-08-29 07:31:39 +00:00
Gerald Carter
f13957824d bumping version
(This used to be commit e5f091e795)
2003-08-29 04:15:59 +00:00
Tim Potter
48cb8f8d5f Fix some compiler warnings.
(This used to be commit f566de0541)
2003-08-29 01:33:00 +00:00
Tim Potter
d425729fd9 Add log2pcap to everything target.
(This used to be commit fb446ba811)
2003-08-29 01:25:17 +00:00
Jeremy Allison
fcdebdae6f Fix bug found by tridge in 2.2.x. Ensure that %U substitution is
restored on next valid packet if a logon fails. This has relevence
if people are using su.exe within logon scripts !
Jeremy.
(This used to be commit d405a93a9d)
2003-08-28 23:57:34 +00:00
Jeremy Allison
afe845235a Fixed warnings in secret code.
Jeremy.
(This used to be commit 86ebf99043)
2003-08-28 23:38:13 +00:00
Gerald Carter
9809c98f24 make sure using_samba 2ed. files get installed ok
(This used to be commit 55b6129bd1)
2003-08-28 21:23:04 +00:00
Gerald Carter
019349339e getting rid of copmpiler warning
(This used to be commit d3f5c5c220)
2003-08-28 20:48:04 +00:00
Gerald Carter
494bb81bb0 fixing typos pointed out by Vance in WHATSNEW
Include patch to manually set the machine trust account
password (on request from jht) to mimic 2.2. behavior.

last changes before RC2 (not counting syncing the docs).
(This used to be commit ce09037144)
2003-08-28 20:24:25 +00:00
Jeremy Allison
569c2827fa Add length warning on register name.
Jeremy.
(This used to be commit 68d02ebbcd)
2003-08-28 18:23:05 +00:00
Jeremy Allison
6872f392f1 Fixed off-by-one bugs in workgroup name comparisons. Complain when a
workgroup name is >15 characters.
Jeremy.
(This used to be commit 35a0b3c035)
2003-08-28 18:12:59 +00:00
Jeremy Allison
76bcb93c66 Fix rename of struct gap. ab - LOOK AT THIS. You changed one module
but not the other. This now compiles but I need verification.
Jeremy.
(This used to be commit 787c9764b3)
2003-08-28 18:11:11 +00:00
Alexander Bokovoy
e83031c84d Refactor charset plugins a bit and add CP437 module.
Now all 8-bit charsets with gaps (not all symbols defined) could be produced through
one macro -- SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP(CHARSETNAME) within source file
with three charset tables. Full source code for such modules can be generated by
source/script/gen-8bit-gap.sh script which was taken from GNU libc and changed slightly
to follow our data types and structure.
(This used to be commit 37042c7bc0)
2003-08-28 17:16:27 +00:00
Gerald Carter
3d393502e7 revert a change to r1.397.2.91 because to operate like the docs; browseable for new home directories should be inheritied from the global defaults, not [homes]
(This used to be commit ea54bfc211)
2003-08-28 16:13:16 +00:00
Jim McDonough
53a2778363 Fix email address in copyright statement
(This used to be commit ffc82460f2)
2003-08-28 14:57:23 +00:00
Alexander Bokovoy
811bd3b3ba skel_ -> cap_
(This used to be commit 8bb033273a)
2003-08-28 12:30:35 +00:00
Jeremy Allison
ce236ad65d Remove what looks like gcc-isms.
Jeremy.
(This used to be commit ed72e0a1d5)
2003-08-27 23:23:17 +00:00
Rafal Szczesniak
06fb721d7f Typo fix.
(This used to be commit 934fb418a3)
2003-08-27 22:05:52 +00:00
Gerald Carter
7f3e60d837 remove 'ldap trust ids' since there was no way for it to work now
(This used to be commit 3724063f15)
2003-08-27 21:17:10 +00:00
Gerald Carter
c2983f9323 Fix bug 327 (again and I think for the last time). Make sure that
pam_smbpass.so will load ok.  Had to move some functions around to work
around dependency problems (hence the new passdb/lookup_sid.c)

Also make sure that libsmbclient.a is built and installed when
we support shared libraries.
(This used to be commit 780055f442)
2003-08-27 20:52:56 +00:00
Gerald Carter
2f70d0d9a7 renaming some functions for consistency
(This used to be commit f4ca4aae8a)
2003-08-27 20:50:24 +00:00
Jim McDonough
270a59f7d3 Fix to properly set AP_OPTS_SUBKEY in heimdal. In MIT it is a #define, but
in heimdal it is an enum.  Thanks to Guenther Deschner (gd@suse.de).

With this join will work, but without a keytab, cifs connections will still
fail with heimdal.  Fix to come later.
(This used to be commit d30bef4c37)
2003-08-27 20:22:12 +00:00
Alexander Bokovoy
da0397bd2f Add CAP VFS module from Monyo. Primary purpose of this module is to provide CAP-compatible encoded file names for CJKV
(This used to be commit e8a5a962ed)
2003-08-27 20:04:23 +00:00
Jeremy Allison
46765d97fa Check for embedded mb chars when testing for illegal characters like /.
Should fix mangling for Japanese language.
Jeremy.
(This used to be commit a238bcc440)
2003-08-27 19:01:55 +00:00
Jeremy Allison
9511c987df Fix initial debug.
Jeremy.
(This used to be commit bd40da0635)
2003-08-27 18:21:26 +00:00
Alexander Bokovoy
6008bd4aeb Ignore smbiconv binary as well
(This used to be commit eea27b9a9c)
2003-08-27 18:19:52 +00:00
Jeremy Allison
8df07f37a2 Remove completely unneeded malloc/free out of this codepath.
Jeremy.
(This used to be commit fda2541697)
2003-08-27 18:17:33 +00:00
Jeremy Allison
8dc1a4f300 Ensure we use correct length nstrings for workgroup and browser names.
Jeremy.
(This used to be commit be534c8adf)
2003-08-27 18:00:09 +00:00
Gerald Carter
4561b811df fix segfault on empty wins server name registration reply
(This used to be commit 743560284c)
2003-08-27 15:07:46 +00:00
Paul Green
cd8c082b79 Be consistent about using capital letters in the function names. (The only
one that really matters is the init entrypoint, but I changed the others
to remain consistent).
(This used to be commit ce0469ad1c)
2003-08-27 15:05:05 +00:00
Gerald Carter
35a42eebed fix bug 230; make sure to set #define SYSV for solaris; do this outside of the checks for shared library support (move the IRIX define as well)
(This used to be commit 42d9b75d8c)
2003-08-27 14:37:24 +00:00
Alexander Bokovoy
bc0f3c1792 Fix typo in configure.in for libsmbclient
(This used to be commit 302da352a2)
2003-08-27 10:42:16 +00:00
Tim Potter
64ca334696 Print an error instead of crashing if no argument is specified for
smbclient -T

Fixes bug 345.
(This used to be commit a46e58e2b6)
2003-08-27 07:39:26 +00:00
Tim Potter
c60f385691 Update last scan time in rescan_trusted_domains().
Fix from Ken Cross.
(This used to be commit 45775b48a0)
2003-08-27 07:26:02 +00:00
Tim Potter
a5cddd08c8 Undo SYSV define for Solaris. Things are more complicated than they
appear.  (-:

I've closed bug 355 as a duplicate of bug 230 which is still a going
concern.
(This used to be commit dfb5050b77)
2003-08-27 06:32:22 +00:00
Tim Potter
92484cab4e Follow on from herb's patch for 1.300.2.145 - define SYSV for solaris to fix
vendor supplied lp printing (bug #355).

For some reason this is not being set in Samba 3.  In Samba 2.2 the
SYSV define was only set from include/includes.h in a haphazard
fashion.  It's probably better to explicitly define it on a per-operating
system basis anyway.
(This used to be commit e653e13f45)
2003-08-27 05:07:25 +00:00
Jeremy Allison
9fdc1363be Fix the character set handling properly in nmbd. Also fix bug where
iconv wasn't re-initialised on reading of "charset" parameters. This
caused workgroup name to be set incorrectly if it contained an
extended character.
Jeremy.
(This used to be commit 84ae44678a)
2003-08-27 01:25:01 +00:00
Alexander Bokovoy
7e27147422 Fix for #150.
We now fallback to Samba-provided CP850 charset module if CP850 or IBM850 does not exist on target system at runtime.
1. Introduce CP850 charset module based on charmaps table from GNU libc 2.2.5
2. Make CP850 charset module shared and build it by default

Should fix Solaris run-time
(This used to be commit e855dc8c91)
2003-08-26 19:48:16 +00:00
Gerald Carter
399ac9a703 adding some debugs while tracking down a bug
(This used to be commit 627ff57861)
2003-08-26 03:13:39 +00:00
Gerald Carter
6e090f1d7d make sure we keep the trusted domain cache up to date
(This used to be commit 3324adcace)
2003-08-25 21:45:57 +00:00
Gerald Carter
93ccb7b817 update python libraries for new cli_spoolss_getprinterdriver() call
(This used to be commit 331a69919c)
2003-08-25 21:16:17 +00:00