1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

6394 Commits

Author SHA1 Message Date
Martin Pool
4f74ff9450 Start adding some debugging features to talloc based on Samba's
ancient mem_man.c:

Each TALLOC_CTX now has a field to store its purpose, to aid in
tracking down memory bloat.  A new call talloc_init_named() should be
used instead of talloc_init() so that this is set.

Added talloc_vasprintf to be called by varargs functions.
(This used to be commit 25b97a7435)
2001-12-19 04:50:10 +00:00
Martin Pool
806ebe9240 Add a very trivial talloc torture program, bin/talloctort. Not built
by default.
(This used to be commit e339066995)
2001-12-19 04:46:35 +00:00
Jeremy Allison
22f25edb8e Fix for extra capabilities from Urban Widmark <urban@teststation.com>.
Jeremy.
(This used to be commit e943ace4f0)
2001-12-19 03:14:54 +00:00
Jeremy Allison
9648cd0c0f Patch from dan_thibadeau@hp.com to allow domain set in authfile.
Jeremy.
(This used to be commit 5700cbbd3f)
2001-12-19 02:50:44 +00:00
Jean-François Micouleau
ea274ac97f added info level 1 to samr_query_alias()
(This used to be commit 589aa4fe22)
2001-12-19 00:15:29 +00:00
Jeremy Allison
dccc1ed3f8 Fixup JF's weird SID return :-).
Jeremy
(This used to be commit 7b8fb8d85c)
2001-12-18 19:44:14 +00:00
Jeremy Allison
ed611ffe1a Tidyup utmp code to cope with hostname = NULL.
Jeremy
(This used to be commit 2a1b531a1c)
2001-12-18 08:19:02 +00:00
Andrew Tridgell
08bf73c326 fixed handling of empty or dead domain in wbinfo -g
(This used to be commit 2c54cfbc47)
2001-12-18 06:22:15 +00:00
Tim Potter
f0e8a3d5e8 A fix to override the location of a user's home directory if it is
specified in the [homes] section of the smb.conf file.

Jeremy, can you take a look at this?  This is in response to someone on the
samba mailing list worrying about it.


Tim.

From: Phil Thompson <philnanne@mediaone.net>
To: samba@lists.samba.org
Subject: Different [homes] behavior in 2.2.2
X-Original-Date: Mon, 17 Dec 2001 23:09:28 -0500


Is it possible to configure samba to disregard the home directory in the
passwd file when using [homes]?  Even though an alternate "path" is set
in [homes], the service fails since the unix home directory is invalid
(nonexistent) on the server.

[...]

This behavior of validating the user's home dir as set in the passwd
files appears to be new
in 2.2.2 and the latest CVS. Anyway to work around this?
(This used to be commit c15dec74a3)
2001-12-18 06:11:32 +00:00
Tim Potter
7cb202e33c Fixed uninitialised variable warning.
(This used to be commit 5095941dcb)
2001-12-18 05:08:48 +00:00
Tim Potter
95a4903b20 Removed unused function, delete_fn()
(This used to be commit f26e8205cf)
2001-12-18 05:04:09 +00:00
Tim Potter
140f1ccf1f Fixed bad args to debug statements.
(This used to be commit 5e0f0716ca)
2001-12-18 05:00:07 +00:00
Jeremy Allison
5d3b81dede I'm pretty sure we need to return our netbios name for LSA_QUERY_INFO
level 5 when we're a standalone server. This makes the security dialogs
return correct info. JF - please check !
Jeremy.
(This used to be commit dd13daf52b)
2001-12-18 02:17:46 +00:00
Jeremy Allison
2a6eeff2a7 Return NT_STATUS_OBJECT_NOT_FOUND or ERRbadpipe if pipe name not found.
Jeremy.
(This used to be commit d5fdb1f096)
2001-12-18 02:09:57 +00:00
Jeremy Allison
0558e2c402 Fixed the bug with descending into mangled directories.
The problem is that name_map_mangle can *change* the length of a patchname.
Ensure that all the character pointer messing about can cope with changing
sizes of components. This code is too ugly to live.....
This also needs *lots* of testing.
Jeremy.
(This used to be commit 9f2b6a0742)
2001-12-18 01:26:54 +00:00
Jean-François Micouleau
e611111732 in lsa_query_info at level 5 in member mode, we must reply our machine
name and not our domain name.

I thought it has been already fixed !

	J.F.
(This used to be commit 1fbb01868b)
2001-12-18 00:32:45 +00:00
Jean-François Micouleau
a94ff206c6 fixing bug I introduced.
J.F.
(This used to be commit 49764852c5)
2001-12-18 00:30:25 +00:00
Jean-François Micouleau
9fc3e980e9 initialise strings
(This used to be commit cb61606b8e)
2001-12-18 00:27:46 +00:00
Jean-François Micouleau
6e76486505 there is no unknown field in LSA_SEC_QOS
some cleanup of the lsa_open_policy and lsa_open_policy2 parser. the
length fields are not correct but that's what NT send. We don't anymore
underflow or overflow the decoding.

added the domain admins group to the default SD.

we are now checking the desired access flag in the lsa_open_policy_X()
calls and in most functions also.

        J.F.
(This used to be commit a217c4e4ff)
2001-12-17 23:03:23 +00:00
Jean-François Micouleau
a081ad3dae tidy up debug
J.F.
(This used to be commit c44f4e9e33)
2001-12-17 22:57:06 +00:00
Jeremy Allison
02c3dcd8ee Made "hide unreadable" work much more reliably (just for Volker :-).
Jeremy.
(This used to be commit f6d6825bc8)
2001-12-17 19:16:22 +00:00
Jim McDonough
db9d6374a3 make sure we pass the lm and nt data in the right order. They were swapped, and somehow this worked when both were provided, but not when only one was.
(This used to be commit 477309b1e6)
2001-12-17 18:53:57 +00:00
Andrew Tridgell
48c45486e3 allow selection of the organisational unit when joining a realm
(This used to be commit f1231c2b54)
2001-12-17 11:16:22 +00:00
Andrew Tridgell
cf5a038adf obey "use mmap" on case tables
(This used to be commit 505a1bdd15)
2001-12-17 11:13:57 +00:00
Andrew Tridgell
ed5db6cc45 removed unused variable
(This used to be commit bed269e6d4)
2001-12-17 11:13:03 +00:00
Tim Potter
0be611c8dc Replaced some hardcoded hex numbers with constants.
Made a note about NOTIFY_OPTION_TYPE and NOTIFY_OPTION_TYPE_DATA - they are
actually one structure.  The latter is just the deferred referrant of the
former.
(This used to be commit b596c0b171)
2001-12-17 01:53:02 +00:00
Tim Potter
55e0930a29 Added some constants for registry data types.
(This used to be commit 6b20d863b7)
2001-12-17 01:45:20 +00:00
Jeremy Allison
28df80cf68 Moved fchown_acl change to the point where we *really* know if we
created the file or not.
Jeremy.
(This used to be commit 32dffa0ba7)
2001-12-16 23:44:38 +00:00
Jeremy Allison
0fd94a5c4b Ensured filetimes set (by name) after close. Ignore errors. This is the
correct way to ensure times set in 'pending modtime' and 'time close'
are always set correctly. Inspired by patch from Juergen Hasch.
Jeremy.
(This used to be commit 2405385854)
2001-12-16 21:04:19 +00:00
Jeremy Allison
9c1120faeb Allow HPUX to link with new ACL code.
Jeremy.
(This used to be commit ad9a5a26e0)
2001-12-15 02:46:48 +00:00
Jeremy Allison
ce1b141ec0 Added HPUX ACL code.
Jeremy.
(This used to be commit 6d03184f8c)
2001-12-15 02:40:16 +00:00
Jeremy Allison
43e325d991 Added the group enum code from 2.2
Jeremy.
(This used to be commit 59e01a22c5)
2001-12-14 21:51:09 +00:00
Jim McDonough
d6b2d28673 If domain SID can't be fetched, we shouldn't return NT_STATUS_NO_MEMORY. It causes a confusing client error. Changed to NT_STATUS_CANT_ACCESS_DOMAIN_INFO.
(This used to be commit 07ea83e6f0)
2001-12-14 21:37:56 +00:00
Gerald Carter
abcd1cad3a ChangeID fixe from APPLIANCE_HEAD
(This used to be commit 096d06a961)
2001-12-14 20:38:04 +00:00
Simo Sorce
ee33b2d3e2 I see no reasons why we should limit username lenght while checking
see bug 22130

jeremy, probably this should be fixed also in 2_2
(This used to be commit d0614b2e66)
2001-12-14 18:49:02 +00:00
Jean-François Micouleau
689144c631 add lsa_query_secobj server code. level 4 is the ACL, level 1 is the
owner. that's basic stuff.

got the POLICY_ define from TNG but they are also in an include file in
the NT SDK.

	J.F.
(This used to be commit 84289a9bf4)
2001-12-14 17:31:48 +00:00
Jeremy Allison
968e2a2976 Updated Solaris link options from DaveCB.
Jeremy.
(This used to be commit 064a3e0fc4)
2001-12-14 16:31:41 +00:00
Jean-François Micouleau
21e3bbbea7 Rafal (mimir) patch for trusts r.
(This used to be commit c26623671e)
2001-12-14 14:35:38 +00:00
Tim Potter
14d7f43590 FALSE -> False
(This used to be commit dbdbf7cd07)
2001-12-14 04:43:31 +00:00
Tim Potter
f46eb14806 Display a nice error message if the user%password specified for net rpc
join does not have administrator privileges.
(This used to be commit af24b1036c)
2001-12-14 03:55:44 +00:00
Tim Potter
69e0fe9972 Display a nice error message for NT_STATUS_LOGON_FAILURE in connect_to_ipc()
(This used to be commit 60eb4dc7b1)
2001-12-14 03:55:09 +00:00
Jim McDonough
fefd9a9243 More help/messages/formatting cleanup.
(This used to be commit 882e5e3bb8)
2001-12-14 02:45:13 +00:00
Tim Potter
c5564c55fc Merge from 2.2 to allow net rpc join -U to complete even if the workstation
account already exists.

# net rpc join --user=Administrator%password

It's kind of weird seeing the mix of NET.EXE style of options (net command
subcommand /arg:value) with the GNU-style long options.  I think it works.
(This used to be commit 3789c8c707)
2001-12-14 02:17:18 +00:00
Jim McDonough
9f3b884d3f Restoration of at least some help function and format. First round of cleanup. Printq function cannot exactly mimic windows output using d_printf...oh well. Add some more command-specific options back into help.
(This used to be commit e135320e05)
2001-12-14 02:15:04 +00:00
Tim Potter
9f6b241175 Set the debuglevel after the call to lp_load() so the change sticks.
(This used to be commit 3c927e39e7)
2001-12-14 02:14:59 +00:00
Andrew Tridgell
d23723a3e4 don't use -u switch to /bin/date - too many systems don't honor it
(This used to be commit 0839cf03a9)
2001-12-14 01:15:14 +00:00
Tim Potter
63bd99aec2 Added comment.
(This used to be commit 594634ff1a)
2001-12-13 23:43:44 +00:00
Jeremy Allison
079a02b15e Patch for string legths from TAKAHASHI, Motonobu(monyo).
Jeremy.
(This used to be commit f0d8b7573f)
2001-12-13 23:43:15 +00:00
Jean-François Micouleau
9f59fc64b8 update the ldap support code. it compiles.
Ignacio you can update your howto ;-)

samsync: a small patch to try chaning challenges.

	J.F.
(This used to be commit c99bc30559)
2001-12-13 18:09:29 +00:00
Gerald Carter
037b40f01f merge from 2.2
(This used to be commit 5b4b3323a3)
2001-12-13 17:18:15 +00:00
Gerald Carter
4ad930ad5e merge from appliance_head
(This used to be commit 423554fd71)
2001-12-13 16:35:43 +00:00
Andrew Tridgell
9a83100c65 -Insswitch/ breaks the build by preventing include of <nss.h> from working
(This used to be commit 1ef9862540)
2001-12-13 13:54:39 +00:00
Andrew Tridgell
1fb2f3649d added "net ads info" to fetch basic ADS info without any auth
(This used to be commit b107ecef70)
2001-12-13 13:19:20 +00:00
Andrew Tridgell
3a1cd6f427 make sure we find NSS_STATUS struct
(This used to be commit 7db718d44a)
2001-12-13 11:58:38 +00:00
Andrew Tridgell
d58b1b5981 better error handling
(This used to be commit ed6279481b)
2001-12-13 11:30:13 +00:00
Andrew Tridgell
75a6ac48a0 try the PDC for our workgroup if we can't find the ldap server
(This used to be commit fc9fd2ca19)
2001-12-13 11:29:49 +00:00
Andrew Tridgell
0ae4916299 improved error message from failed connect
(This used to be commit 4405a87fb7)
2001-12-13 08:54:51 +00:00
Jeremy Allison
e0d3a9e443 Must check against -1 for fcntl error check.
Jeremy
(This used to be commit 1d2504b5c7)
2001-12-13 02:34:43 +00:00
Tim Potter
23b239625c Fix some compiler warnings.
(This used to be commit 216dff4380)
2001-12-13 00:02:37 +00:00
Jeremy Allison
a85390ae69 Always use ASCII strings when changing passwords with RAP.
Jeremy.
(This used to be commit d3ac2265b1)
2001-12-12 19:40:22 +00:00
Herb Lewis
62877996e4 ran autoconf
(This used to be commit f881a8f197)
2001-12-12 16:13:52 +00:00
Herb Lewis
ed7caa2ecf allow IRIX to build nsswitch/libnss_wins.so
(This used to be commit 564bfd7728)
2001-12-12 16:08:32 +00:00
Herb Lewis
e4553718bb add *.po32 to ignore list
(This used to be commit fe0db4c55f)
2001-12-12 16:04:37 +00:00
Jean-François Micouleau
a5ba214479 added a -V[erbose] option to samsync. Decode a lot of information
I'm looking at chaining the credentials

	J.F.
(This used to be commit d49c8e4d3d)
2001-12-12 15:25:22 +00:00
Jean-François Micouleau
1c95d1d16b decoded SAM_DELTA 0x0e and 0x12.
One is an entry for the trusted domains
The other is an entry for the trusting domains

They are pretty basic, I'll improve them.

	J.F.
(This used to be commit 8d359e6213)
2001-12-12 11:38:57 +00:00
Jean-François Micouleau
c75d9409aa a ugly decoder for SAM_DELTA_DOM_INFO (0x0d)
a correct decoder for SAM_PRIVS_INFO (0x10)

this code is totally useless right now, it's just fun to decode those and
will save tpot some time.

	J.F.
(This used to be commit 314b675ed9)
2001-12-12 09:43:56 +00:00
Andrew Tridgell
60b53b3f6f added "net time zone" command to show the timezone on a computer
(This used to be commit 4e2691b1c1)
2001-12-12 09:37:17 +00:00
Andrew Tridgell
65cfe6a492 pam_smbpass updates from a.bokovoy@sam-solutions.net
(This used to be commit 016e203a2c)
2001-12-11 23:44:33 +00:00
Tim Potter
6526a42558 Oops, the -a option disappeared.
(This used to be commit 6194f874bb)
2001-12-11 23:27:45 +00:00
Herb Lewis
fb8b642a98 add PATH_FLAGS to .po32 objects so dynconfig builds with smbwrapper
(This used to be commit 5bf6f91937)
2001-12-11 20:41:31 +00:00
Herb Lewis
b9f2c47956 sync with 2.2
added multiple include protection
added IRIX defines
(This used to be commit b9dbb38bf2)
2001-12-11 20:20:30 +00:00
Jim McDonough
d9c3ef8450 Replace backslash with winbind separator before calling parse_domain_user(). Winbind separators other than backslash didn't work.
(This used to be commit 6688781331)
2001-12-11 19:27:40 +00:00
Herb Lewis
ee4d682115 fix for IRIX compilers
(This used to be commit b110f57e49)
2001-12-11 18:08:48 +00:00
Andrew Tridgell
331fa95b7a allow join of already joined domain
(This used to be commit 784a3f2951)
2001-12-11 12:29:03 +00:00
Andrew Tridgell
3607b3ccab prevent double free
(This used to be commit 3628a978d1)
2001-12-11 10:37:00 +00:00
Jeremy Allison
9bb0a964bf Fix up warnings. Make tdb_openXX() names const.
Jeremy.
(This used to be commit 9e3581827d)
2001-12-11 08:31:58 +00:00
Jeremy Allison
dd324a5357 Tidyups to remove warnings on tdb standalone code.
Jeremy.
(This used to be commit b03aaddcf3)
2001-12-11 08:24:36 +00:00
Andrew Tridgell
d86b7f9dc3 handle systems without setenv()
(This used to be commit 8709065246)
2001-12-11 06:17:01 +00:00
Andrew Tridgell
70095b09c3 handle a NULL hostname in cli_connect()
(This used to be commit a181f49b42)
2001-12-11 05:48:27 +00:00
Andrew Tridgell
6939dd050b better error handling
(This used to be commit 75621d5284)
2001-12-11 05:47:26 +00:00
Andrew Tridgell
e5dbe13b58 added a comment about /bin/date
(This used to be commit 2183c1f3b0)
2001-12-11 05:28:56 +00:00
Andrew Tridgell
32ba2c889f added a net time command. Allow display or set of system time based on
a SMB server

particularly useful for ADS is:

	net time set -S DOMAIN#1B

this makes kerberos clock skew problems go away :)
(This used to be commit b3ba2293d0)
2001-12-11 05:21:50 +00:00
Tim Potter
6cc5e2edc1 Modify winbindd to use authenticated user info from secrets.tdb when making
IPC$ connections to domain controllers.
(This used to be commit 1217ef28a6)
2001-12-11 05:19:15 +00:00
Tim Potter
f4dfa9b6b2 Converted wbinfo to use popt instead of getopt - popt is very nice!
Added a --set-auth-user function to set a username and password that can be
used by winbindd when making connections to domain controllers.  This is
necessary when restrictions have been placed on anonymous connections
either through the RestrictAnonymous registry setting, or the win2k Local
Security Policy -> Security Settings -> Local Policies -> Security Options
-> Additional restrictions for anonymous connections.  (phew)

Two new keys are set in secrets.tdb: SECRETS/AUTH_USER and
SECRETS/AUTH_PASSWORD which hold the username and plaintext password of the
user to connect as.

To reset these values, run wbinfo --set-auth-user ""
(This used to be commit 507003522b)
2001-12-11 05:18:36 +00:00
Andrew Tridgell
5ffe722a55 detect attempts to connect to names of the type NAME#xx and do a
netbios lookup for name NAME with node type xx.

This affects all our client progs. Very useful :)
(This used to be commit b4304c5231)
2001-12-11 05:16:48 +00:00
Andrew Tridgell
66d964c9fc allow overriding the local time in kerberos_kinit_password()
(This used to be commit cb9dbcef7c)
2001-12-11 05:15:52 +00:00
Tim Potter
4589265bb0 Removed unreferenced getopt() externals.
(This used to be commit c87d1ad321)
2001-12-11 04:25:21 +00:00
Tim Potter
6a60668fe2 SAMR query sec obj returns different results depending on which sam handle
it is passed.  Not sure what these different contexts are called or what
they are used for.

 - if a rid is specified to samquerysecobj then use the sam user policy
    handle for that rid
 - if -d is specified then use the sam domain policy handle
 - otherwise just use the sam connect policy handle

JF, any ideas about this?
(This used to be commit 4ef50ef9f7)
2001-12-11 03:03:45 +00:00
Tim Potter
44d423419a Grr - people who put const everywhere should fix up all the warnings they
generate.
(This used to be commit d1ebd259c8)
2001-12-11 02:23:14 +00:00
Tim Potter
31611dd2f4 Removed unused variable.
(This used to be commit 1dc0e9096d)
2001-12-11 02:22:42 +00:00
Tim Potter
b872787f01 Doing some research into ACLs on the LSA and SAM policy objects.
- added lsaquerysecobj to rpcclient
 - renamed querysecobj to samquerysecobj
 - removed duplicated display_sec_acl() code from cmd_spoolss.c and
   cmd_samr.c and moved it into display_sec.c
(This used to be commit 59b2e3f408)
2001-12-11 02:17:26 +00:00
Andrew Tridgell
d033e53300 removed the start_ndx parameter from group enumeration
I tried testing this by lowering the buffer size in
cli_samr_enum_dom_groups() but that didn't work - I think this needs
more looking into
(This used to be commit 34328e3031)
2001-12-11 01:04:13 +00:00
Tim Potter
d032059df9 Compile fix.
(This used to be commit 83caa883d7)
2001-12-11 00:11:11 +00:00
Andrew Tridgell
abeb0f50ea got rid of start_ndx from query_user_list()
(This used to be commit 1c909afe76)
2001-12-11 00:03:58 +00:00
Jean-François Micouleau
bf5a0e6717 NT_STATUS(0x80000005) maps to ERRDOS,234
J.F.
(This used to be commit 80e36549b6)
2001-12-10 23:34:32 +00:00
Jean-François Micouleau
ecf7017eca added enum alias groups to rpcclient
(This used to be commit d4bc8f02f7)
2001-12-10 22:30:31 +00:00
Andrew Tridgell
0c29881501 reinstated all the rap commands as top level commands until we get the
protocol switch mechanism in place
(This used to be commit d20c3717dd)
2001-12-10 22:25:21 +00:00
Andrew Tridgell
3d27d7b9f7 moved ccache location change into winbindd code
(This used to be commit be254eb13c)
2001-12-10 22:10:31 +00:00
Andrew Tridgell
273deacb32 robustness fixes and moved ccache location into winbindd_ads code
(This used to be commit 24aa09ff3d)
2001-12-10 22:10:16 +00:00
Jeremy Allison
a427fafc1f Treat RAP codes differently.
Jeremy.
(This used to be commit 919b11a787)
2001-12-10 19:48:43 +00:00