1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

11239 Commits

Author SHA1 Message Date
Andrew Bartlett
66468d2315 Patch by Metze to ensure that we always at least initialize our output string
for rpc_pull_string.  If we had a NULL or zero-length string, we would use
uninitialised data in the result string.

Andrew Bartlett
(This used to be commit df10aee451)
2003-04-23 14:07:33 +00:00
Andrew Bartlett
11c453951a More fun with Sun CC needing constant initializers
(This used to be commit ce3dd8fd69)
2003-04-23 13:59:32 +00:00
Andrew Bartlett
7ae2477197 StrnCpy -> safe_strcpy() on a over-malloced struct.
Andrew Bartlett
(This used to be commit e4f1171d57)
2003-04-23 13:35:10 +00:00
Andrew Bartlett
2a3a9f0bf4 Merge the 'safe' parts of my StrnCpy patch - many of the users really wanted
a pstrcpy/fstrcpy or at most a safe_strcpy().

These have the advantage of being compiler-verifiable.

Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server.  (This pushes around const string pointers, rather
than copied strings).

Andrew Bartlett
(This used to be commit 32fb801ddc)
2003-04-23 13:27:35 +00:00
Andrew Bartlett
13b54b9cfa We don't have IDMAP in 3.0 yet.
(This used to be commit a507f170d2)
2003-04-23 13:23:47 +00:00
Andrew Bartlett
1a9394195d Merge HEAD's winbind into 3.0.
This includes the 'SIDs Rule' patch, mimir's trusted domains cacheing code,
the winbind_idmap abstraction (not idmap proper, but the stuff that held up
the winbind LDAP backend in HEAD).

Andrew Bartlett
(This used to be commit d4d5e6c2ee)
2003-04-23 11:54:56 +00:00
Andrew Bartlett
656d2c75c9 Don't try to continue if initialisation fails (merge from HEAD)
(This used to be commit ff3ec67e12)
2003-04-23 11:29:54 +00:00
Andrew Bartlett
be86f6555a Make the variable name match the comment.
Andrew Bartlett
(This used to be commit 5a577f8caf)
2003-04-23 11:11:02 +00:00
Andrew Bartlett
2ee8590c4f This define does not always seem to be present, so define it if need be.
Andrew Bartlett
(This used to be commit 007143e243)
2003-04-23 11:03:08 +00:00
Andrew Bartlett
327ad645dd Fix up non-constant initialisers for Sun's CC.
Andrew Bartlett
(This used to be commit 82ba1b4d16)
2003-04-23 10:28:56 +00:00
Andrew Bartlett
db7b2e822f Parinoia for compleatly broken SMB servers that don't send back the right
fstype for IPC$ - assume the device type is IPC.

Andrew Bartlett
(This used to be commit 5ec7804212)
2003-04-23 10:07:25 +00:00
Andrew Bartlett
95af8e27b1 Make this safe for -DDEVELOPER checks.
Andrew Bartlett
(This used to be commit 39fb77d8c1)
2003-04-23 10:06:00 +00:00
Andrew Bartlett
9265628c20 This const isn't quite vaild C.
Andrew Bartlett
(This used to be commit de96c1aaca)
2003-04-23 09:32:29 +00:00
Andrew Bartlett
2e9c2084a6 Add a check to ensure that the server returns the correct device type, not
just the correct error.

This should help us avoid breaking NT4 IPC$ connections, for example.

This has required that we don't overwrite the device type for IPC$ in our
tcon&X code, but only smbwrapper even uses it, and a server that doesn't send
a correct dev type breaks other things pretty badly.

In any case, I'll 'fix' smbwrapper :-).

Andrew Bartlett
(This used to be commit a93057efcb)
2003-04-23 09:26:07 +00:00
Andrew Bartlett
2206df6b30 Merge torture tests from HEAD - it looks like we had rather an incomplete
merge last time.  I hope this might fix a few failures on the build farm too.

Andrew Bartlett
(This used to be commit 0c83712692)
2003-04-23 08:12:34 +00:00
Andrew Bartlett
4962f4d176 Try to keep existing behaviour for our printing code - never return
global_myname(), always either the name the client called us, or if they
didn't call us anything useful, our IP address.

Jerry, can you check this?

Andrew Bartlett
(This used to be commit 599e70bffb)
2003-04-23 01:44:04 +00:00
Andrew Bartlett
95705e904f Fix this for both *SMBSERVER and *SMBSERV as per comments in loadparm.c.
Andrew Bartlett
(This used to be commit c6d416541b)
2003-04-23 01:34:56 +00:00
Andrew Bartlett
97a9832541 Try to avoid setting *SMBSERVER as a 'local name'.
Andrew Bartlett
(This used to be commit 5b5e167bb1)
2003-04-23 01:21:42 +00:00
Andrew Bartlett
0e26a6d3f5 Don't leak the session identifier string when we shut down a vuid.
Andrew Bartlett
(This used to be commit 33189b4be0)
2003-04-23 01:05:26 +00:00
Andrew Bartlett
846a773bda Now that Volker fixed the real issues with ldapsam and adding null attributes
etc, move the SAMR create_user code back to using the 'pdb_init_sam_pw' method
to fill out the attributes.

This is basicly the same code, but we really didn't need the duplication.

Also, take advantage of the fact that RIDs will always be returned back into
the SAM_ACCOUNT on ADD, so we don't need to duplicate the 'get'.

This should also help in sites with replicated LDAP - the second fetch might
occour before the first is replicated back.

Andrew Bartlett
(This used to be commit 39714c24fd)
2003-04-23 01:04:20 +00:00
Andrew Bartlett
da6b12b931 - Merge a memory leak fix from HEAD
- change update behaviour for new RIDs:
 - store the new RID into the SAM_ACCOUNT, so that the caller get's it back
   automaticly
 - use this to make the code paths simpiler for the normal 'need_update' code.

We must always store a RID if we intend to use the sambaAccount objectClass

Andrew Bartlett
(This used to be commit 5edeee5116)
2003-04-23 00:59:19 +00:00
Andrew Bartlett
63118136fa Merge idra's fix for pdb_tdb segfaults from HEAD to 3.0 - sombody changed
unix_strlower semantics.

Andrew Bartlett
(This used to be commit 93bdd1a292)
2003-04-23 00:56:06 +00:00
Gerald Carter
cfe53bd066 allow the unix group in a mapping to be changed; doesn't work with LDAP right now but should be ok with tdb's
(This used to be commit fdacad185c)
2003-04-23 00:34:31 +00:00
Jeremy Allison
30418a47c6 Limit the number of outstanding print notify messages for a process to
1000.
Jeremy.
(This used to be commit 2e5e4c10d2)
2003-04-23 00:19:30 +00:00
John Terpstra
9c6e58869f Added Stephen Roylance's patch - Adds to Status page, a Start All, Restart All
and Stop All deamons button.
(This used to be commit 57cfcb3108)
2003-04-22 23:19:09 +00:00
Andrew Bartlett
a4b00668e6 Remove ldapsam_search_one_user_by_uid from pdb_ldap.
sambaAccount requires the rid to be present, and doing this fallback is quite
dangerous, becouse it assumes that alorithmic RIDs are in use - which is quite
often not the case.

Also finish of vl's work on 'use a function pointer, not embedded logic' to
tell lower levels that they should/should not attempt to set the user's password
into LDAP with the extended operation.

Andrew Bartlett
(This used to be commit 715d0bd804)
2003-04-22 23:14:49 +00:00
Gerald Carter
651ff45e8d don't reset the group type unless specified
(This used to be commit 541f40a144)
2003-04-22 18:03:55 +00:00
Gerald Carter
1446682565 update copyright notice that is written to the logs
(This used to be commit 6735a9889f)
2003-04-22 17:32:02 +00:00
Jeremy Allison
2aa7b1573c Add runtime tests for "impossible" case with -DDEVELOPER. Trying to catch logic
error on Linux.
Jeremy.
(This used to be commit 546d1a941b)
2003-04-22 17:30:53 +00:00
John Terpstra
2595d6f94b Added editreg.
(This used to be commit ce016df1ec)
2003-04-22 17:06:03 +00:00
Volker Lendecke
e15dfd44c9 parse_string is only used for the authentication negotiators.
It can itself determine the length of the string it has to
transfer. Andrew B., could you take a look at the length calculation?
Is that safe?

Thanks,

Volker
(This used to be commit 0ef69b586a)
2003-04-22 15:54:36 +00:00
Andrew Bartlett
babd260262 This is meant to be initialised to the size of the buffer.
(This used to be commit ca489db7d3)
2003-04-22 15:50:15 +00:00
Andrew Bartlett
f957f1aeaf Add configure test for previous ldap modifications - we now check if the
ldap_initialze function exists, not just if we are on a particular OpenLDAP.

Andrew Bartlett
(This used to be commit 8a20162db6)
2003-04-22 15:27:38 +00:00
Andrew Bartlett
690e29a041 Make pdb_ldap use a random factor in deciding how long we need to sleep.
This might help avoid killing the ldap server when all 100 smbd processes
reconnect in pulses...

Also, reduces the maximum wait time, as SMB clients will time out after 30
seconds anyway...

Andrew Bartlett
(This used to be commit 08c5aaae6a)
2003-04-22 15:19:14 +00:00
Andrew Bartlett
bc83d3a4ed Merge (HEAD->3.0) mbp's fixes to our charcnv code - don't use a staic buffer,
which can restrict things like unix_strupper() to 512 byte strings.

Andrew Bartlett
(This used to be commit 341d6affa4)
2003-04-22 13:15:24 +00:00
Andrew Bartlett
53f2dd686a Merge mimir's trusted domain code from HEAD -> 3.0, plus some memory
leak fixes. (secrets.c portion)

Andrew Bartlett
(This used to be commit 3ea8fdd036)
2003-04-22 13:10:02 +00:00
Andrew Bartlett
cb380f13f7 Merge comment with HEAD
(This used to be commit 8f8d819d58)
2003-04-22 12:28:30 +00:00
Andrew Bartlett
4f0381bb96 Start merging mimir's trusted domain code from HEAD to 3.0. (for HEAD trusting
NT).
(This used to be commit 76cd4a8901)
2003-04-22 12:13:13 +00:00
Volker Lendecke
8301c8c0e4 Setting the credentials for the netsec netlogon pipe connect upon each
samlogon call certainly breaks the credential chain. Do it once during
the bind response.

Volker
(This used to be commit d4262c37f1)
2003-04-22 11:25:10 +00:00
Andrew Bartlett
434f312434 Oops...
Andrew Bartlett
(This used to be commit 898ff89632)
2003-04-22 08:50:20 +00:00
Andrew Bartlett
8de48f3093 Make our 'get DNS domain name' code try a bit harder - if gethostname() doesn't
include a domain portion, do a gethostbyname() lookup on that name.

Use this name in our PolicyPrimaryDomainInformation reply (_lsa_query_info2)
that Win2k uses when trying to trust us as a trusted domain.

(We need to do a better mapping between our Netbios and Win2k domain names,
but this will do for now - particularly annoying is the way this possibly needs
to map with our kerberos realm).

Andrew Bartlett
(This used to be commit 3be0327103)
2003-04-22 07:28:41 +00:00
Gerald Carter
9465f4b2c4 default new groups to domain groups
(This used to be commit 665d21b865)
2003-04-22 05:57:49 +00:00
Andrew Bartlett
96e1202f23 Fix up bugs in the new 'store sec_channel type' code - we were always joining
as a BDC.

Andrew Bartlett
(This used to be commit f35674e755)
2003-04-22 05:32:01 +00:00
Gerald Carter
cbdb436e21 support referencing group by sid in all operations; allow group name to be changed
(This used to be commit b6ccdb8f7b)
2003-04-22 05:14:21 +00:00
Gerald Carter
6f99b229db wrap pdb_enum_group_mapping() in [un]become_root() so LDAP queries can get the credentials from secrets.tdb
(This used to be commit bb8b63b865)
2003-04-22 03:15:32 +00:00
Gerald Carter
3996f116c7 removing some ifdef'd out code
(This used to be commit 43942398af)
2003-04-22 02:52:15 +00:00
Jeremy Allison
505b3f5814 Tidyups of some dubious logic discovered whilst trying to track down a
strange oplock related issue on the PSA.
Jeremy.
(This used to be commit 1dd274bf61)
2003-04-22 01:12:52 +00:00
Jeremy Allison
530dc71732 Fixup a few typos for Jerry.
Jeremy.
(This used to be commit 1e5fe87d75)
2003-04-21 23:23:24 +00:00
Gerald Carter
79d3731d98 * fix segfault when no vfs objects defined
* add "sid=..." to 'net groupmap add'
(This used to be commit e5f6676639)
2003-04-21 19:43:25 +00:00
Andrew Bartlett
4437f7f76d Make it easier to select which domain to show the sid for.
(This used to be commit 4c7efe25c3)
2003-04-21 17:25:54 +00:00
Andrew Bartlett
f071020f5e Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 876e00fd11)
2003-04-21 14:09:03 +00:00
Andrew Bartlett
06c99d15e2 Add const, static and fix a double free() (merge from HEAD).
(This used to be commit 9ba88c7314)
2003-04-21 13:10:35 +00:00
Andrew Bartlett
c75af6b980 Merge whitespace and const from HEAD
(This used to be commit 88fdc36f93)
2003-04-21 13:05:51 +00:00
Andrew Bartlett
029f0ab20b Header updates for smb signing merge
(This used to be commit 2e4b45cd2e)
2003-04-21 13:04:39 +00:00
Andrew Bartlett
1e2147fc0f Merge SMB signing, cli buffer clobber and NTLMSSP signing tweaks from HEAD.
(This used to be commit c6c4f69b8d)
2003-04-21 13:00:39 +00:00
Jelmer Vernooij
fd8d17393d Default to "passdb.xml" as default output filename instead of "-"
(This used to be commit dfbd2a2e7a)
2003-04-21 01:55:37 +00:00
Jelmer Vernooij
858137d0dd - Fix modules build of pdb_mysql and pdb_xml
- Fix typo in script/installswat.sh
(This used to be commit 8d2aec7a73)
2003-04-21 01:04:17 +00:00
Jelmer Vernooij
0971cbb9eb Pdb modules are in $libdir/pdb not $libdir/passdb
(This used to be commit 9c9d969c93)
2003-04-21 00:38:39 +00:00
Volker Lendecke
8aa04b531e Merge a trivial fix across from HEAD. Not that this
would work now...

Volker
(This used to be commit 8c70f657cf)
2003-04-20 08:13:29 +00:00
Volker Lendecke
623336e817 Address gcc warnings.
I could not fix the "passing arg 5 of `ldap_search_s'" completely with
gcc -Wall. A non-developer compile does not complain though.

Volker
(This used to be commit cf923d7133)
2003-04-19 18:44:11 +00:00
John Terpstra
4a317cb748 Added smbgroupedit to PROGS2
(This used to be commit bed69decea)
2003-04-19 16:27:30 +00:00
Simo Sorce
7706e98d9d use gid_t for gids not uid_t
(This used to be commit a369c2ff26)
2003-04-19 15:31:40 +00:00
Gerald Carter
a1fb9f2176 Merging smbgroupedit into 'net groupmap'. Not entirely done.
Need to check on where the privilege code is sitting
and update the docs.

Examples:

root# bin/net help groupmap
net groupmap add
  Create a new group mapping
net groupmap modify
  Update a group mapping
net groupmap delete
  Remove a group mapping
net groupmap list
  List current group map

# bin/net groupmap add
Usage: net groupmap add rid=<int> name=<string> type=<domain|local|builtin> [comment=<string>]

# bin/net groupmap delete
Usage: net groupmap delete name=<string|SID>

# bin/net groupmap modify
Usage: net groupmap modify name=<string|SID> [comment=<string>] [type=<domain|local>
(This used to be commit f2fd0ab41f)
2003-04-19 05:53:55 +00:00
Jelmer Vernooij
48dea39b1d 'vfs object' is a list not a string (we have cascaded VFS modules in 3_0 as
well now)
(This used to be commit 6220068d48)
2003-04-18 20:23:11 +00:00
Gerald Carter
6bbedbdb5a fix byte ordering when using CIDR notation in hosts allow/deny; spotted by Eloy Paris
(This used to be commit 6155144b9f)
2003-04-18 14:55:43 +00:00
Volker Lendecke
e54b9d59d6 Survive a samdump with an alias that has no description
Volker
(This used to be commit 5af417a6ba)
2003-04-18 08:35:08 +00:00
Gerald Carter
fb3ff5fc44 fixing torture build by merging code from HEAD
(This used to be commit 7798c7ee1a)
2003-04-18 03:35:39 +00:00
Jelmer Vernooij
3dcc6e28c2 Do not use lp_parm_bool() and lp_parm_ulong() yet. They're only in HEAD
(This used to be commit 58aa32ea6a)
2003-04-17 20:13:08 +00:00
Jelmer Vernooij
8671229796 Remove SamBackend variable (is already gone in HEAD)
(This used to be commit 3a99e5a2db)
2003-04-17 20:01:22 +00:00
cvs2svn Import User
3dd0de3196 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit a50dc3f836) 2003-04-17 08:09:21 +00:00
Richard Sharpe
953aef482b More updates ...
(This used to be commit 410451f947)
2003-04-17 08:09:20 +00:00
Richard Sharpe
6584cde213 Updates to editreg.c to provide more functionality ...
Hopefully more coming ...
(This used to be commit 22d1819011)
2003-04-17 06:20:29 +00:00
Jeremy Allison
e156cf7df4 Fixes for multi-PDU schannel - based on Volker's code. This code needs
tidying up. Samsync still doesn't work due to bad parsing of net_io_sam_alias_info
with a blank description. Still working on this....
Jeremy.
(This used to be commit 942fede9a5)
2003-04-16 21:09:48 +00:00
Jim McDonough
bdaac40746 Move PAC decoding over from HEAD.
(This used to be commit b0fd4e5555)
2003-04-16 16:57:01 +00:00
Jeremy Allison
8f25fd3d72 Fixes to make SCHANNEL work against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
(This used to be commit ec82e8e9f4)
2003-04-16 15:54:00 +00:00
Jeremy Allison
09a50497d1 Fixes to make SCHANNEL work in 3.0 against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
(This used to be commit ff66d40970)
2003-04-16 15:39:57 +00:00
Jelmer Vernooij
84e2fbf17c Add -berok to LDSHFLAGS on AIX so modules build on AIX 5 (reported
by Stephen D. Roylance)
(This used to be commit 502f332345)
2003-04-16 14:57:14 +00:00
Jelmer Vernooij
8911258e7e Only use backtrace variables when we can use them
(This used to be commit 17243c61b5)
2003-04-16 14:51:44 +00:00
Jelmer Vernooij
b5fd86aee1 Only declare backtrace variables when using them
(This used to be commit 429b373453)
2003-04-16 14:51:02 +00:00
Jelmer Vernooij
ddf662d118 More merges from HEAD:
- Stephan Kulow's changes (fixing warnings in libsmbclient)
 - VFS modules
 - Seperating libs
(This used to be commit 6e9b780233)
2003-04-16 14:45:11 +00:00
Jelmer Vernooij
0abad3ad5c Check whether return status of poptGetNextOpt is -1, not EOF
(This used to be commit 1fefb776ee)
2003-04-16 14:31:10 +00:00
Andrew Tridgell
7176f75036 fixed the popt option handling in nmbd, so that -i now works
(This used to be commit 2bb93421e6)
2003-04-16 14:25:56 +00:00
Jelmer Vernooij
8213a4dc2e Check for -1 not EOF as return value of poptGetNextOpt
(This used to be commit 84fba11ff0)
2003-04-16 14:24:45 +00:00
Andrew Bartlett
8a98adf7dd Fix segfault by getting this the right way around
(This used to be commit 8ba6148c69)
2003-04-16 14:23:01 +00:00
Andrew Bartlett
8cb0672c58 Merge valgrind header usage from HEAD.
(This used to be commit 5c978e39f2)
2003-04-16 13:19:51 +00:00
Jelmer Vernooij
004502551b Add support for the new modules system to lib/iconv.c (merge from HEAD)
(This used to be commit 64a357017a)
2003-04-16 13:09:00 +00:00
Jelmer Vernooij
5e96970480 Add make destination for librpc_echo
(This used to be commit 7ef7910004)
2003-04-16 12:59:12 +00:00
Jelmer Vernooij
a8c95d79f8 Add support for the new modules system to auth/ (merge from HEAD)
(This used to be commit c7a1de090d)
2003-04-16 12:13:07 +00:00
Andrew Bartlett
0d072569ae Adjust comment to respect change to no longer use unixsam by default...
(This used to be commit 87f491d6a6)
2003-04-16 12:02:02 +00:00
Andrew Bartlett
90ddf1a21a This code is no longer referenced - moved to the new libsmb/ldap.c
Andrew Bartlett
(This used to be commit c98bbc7507)
2003-04-16 12:00:32 +00:00
Andrew Bartlett
4c6d325781 Expand this magic number into the #defines it is made up of.
(This used to be commit 3d2d19b910)
2003-04-16 11:56:58 +00:00
Andrew Bartlett
ddc858a961 Add some static and #ifdef DEVELOPER
(This used to be commit 3bdbd320b0)
2003-04-16 11:14:13 +00:00
Andrew Bartlett
520ddfc0ac Put this comment in a better place...
(This used to be commit 3fdddade0f)
2003-04-16 10:25:42 +00:00
Andrew Bartlett
c56eca05bf NTSTATUS strings are much more use than raw numbers...
(This used to be commit aeaa60c843)
2003-04-16 10:24:24 +00:00
Andrew Bartlett
2cb0b91ed1 Store the type of 'sec channel' that we establish to the DC. If we are a
workstation, we have to use the workstation type, if we have a BDC account,
we must use the BDC type - even if we are pretending to be a workstation
at the moment.

Also actually store and retreive the last change time, so we can do
periodic password changes again (for RPC at least).

And finally, a couple of minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 6e6b7b79ed)
2003-04-16 10:20:14 +00:00
Andrew Bartlett
f9cde25fa4 Make this code actually compile (--with-ldapsam).
This might not actually be the 'right way' to do this, but it's better to
have it compile...

Andrew Bartlett
(This used to be commit c7dc0b27ac)
2003-04-16 09:41:10 +00:00
Jelmer Vernooij
ef41d0d951 Add torture to everything..
(This used to be commit 89048748ae)
2003-04-16 09:12:26 +00:00
Jelmer Vernooij
abb10073d3 Don't build the torture progs in 'make all'
(This used to be commit 4477954696)
2003-04-16 08:57:12 +00:00
Jeremy Allison
161017758e Fix mem leak. Spotted by tpot (thanks Tim).
Jeremy.
(This used to be commit adeac265a0)
2003-04-16 08:46:36 +00:00
Jeremy Allison
cf00ce3e87 Fix mem leak. Spotted by tpot (thanks Tim).
Jeremy.
(This used to be commit 03a1f46e34)
2003-04-16 08:46:03 +00:00