1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-23 11:17:06 +03:00

112 Commits

Author SHA1 Message Date
Gerald Carter
ae2bf464c4 r15680: use the user creds when calling net_set_machine_spn() rather than the machine creds (just like WinXP) 2007-10-10 11:17:07 -05:00
Gerald Carter
d933ac273d r15597: more ads join fixes -- we can only set the PWDNOEXP and DES_ONLY acb flags on the setuserinfo(), not the createuser info call 2007-10-10 11:17:02 -05:00
Gerald Carter
00c795e366 r15561: Should re-fix older systems without RC4-HMAC support 2007-10-10 11:17:01 -05:00
Gerald Carter
b69ac0e304 r15560: Since the hotel doesn't have Sci-Fi and no "Doctor Who"....
Re-add the capability to specify an OU in which to create
the machine account.  Done via LDAP prior to the RPC join.
2007-10-10 11:17:01 -05:00
Günther Deschner
8dd925c5fb r15559: Smaller fixes for the new cldap code:
* replace printf to stderr with DEBUG statements as they get printed in
  daemons
* "net ads lookup" return code

Guenther
2007-10-10 11:17:01 -05:00
Gerald Carter
4c4ea7b20f r15543: New implementation of 'net ads join' to be more like Windows XP.
The motivating factor is to not require more privileges for
the user account than Windows does when joining a domain.

The points of interest are

* net_ads_join() uses same rpc mechanisms as net_rpc_join()
* Enable CLDAP queries for filling in the majority of the
  ADS_STRUCT->config information
* Remove ldap_initialized() from sam/idmap_ad.c and
  libads/ldap.c
* Remove some unnecessary fields from ADS_STRUCT
* Manually set the dNSHostName and servicePrincipalName attribute
  using the machine account after the join

Thanks to Guenther and Simo for the review.

Still to do:

* Fix the userAccountControl for DES only systems
* Set the userPrincipalName in order to support things like
  'kinit -k' (although we might be able to just use the sAMAccountName
  instead)
* Re-add support for pre-creating the machine account in
  a specific OU
2007-10-10 11:16:57 -05:00
Volker Lendecke
f21adc04f7 r15471: Clarify error message 2007-10-10 11:16:51 -05:00
Gerald Carter
cf71f88a3c r15462: replace the use of OpenLDAP's ldap_domain2hostlist() for
locating AD DC's with out own DNS SRV queries.
Testing on Linux and Solaris.
2007-10-10 11:16:49 -05:00
Günther Deschner
847882a983 r15460: Prefer to use the indexed objectCategory attribute (instead of
objectClass which is not indexed on AD) in LDAP queries.

Guenther
2007-10-10 11:16:49 -05:00
Jeremy Allison
780b71d300 r15336: Unknown escape sequence: '\305' - should have been '\n'.
(How did that get in there ?).
Jeremy
2007-10-10 11:16:36 -05:00
Günther Deschner
5557ada694 r15305: Let winbind search by sid directly (or in windows terms: "bind to a
sid"); works in all AD versions I tested. Also add "net ads sid" search
tool.

Guenther
2007-10-10 11:16:33 -05:00
Günther Deschner
ba81b508ca r15194: We need to be able to join as PDC as well. Thanks to Andrew Bartlett.
Guenther
2007-10-10 11:16:28 -05:00
Volker Lendecke
0ef5e4372c r15137: Refuse to join if our netbios name is longer than 15 chars. I think this is
sufficient to fix bug #3659.

Volker
2007-10-10 11:16:26 -05:00
Volker Lendecke
a6e88785e7 r15136: Fix join consistency check 2007-10-10 11:16:25 -05:00
Günther Deschner
22b6875897 r15123: Don't even try to join with an inproper configuration.
Guenther
2007-10-10 11:16:25 -05:00
Jeremy Allison
75be5c17bc r14831: Fix possible null deref. Coverity #279.
Jeremy.
2007-10-10 11:15:49 -05:00
Günther Deschner
d17712f976 r14757: Make sure we only send out a CLDAP request to an connected AD server.
Guenther
2007-10-10 11:15:46 -05:00
Volker Lendecke
db00570535 r14099: Fix Coverity # 113 2007-10-10 11:11:12 -05:00
Lars Müller
f650e3bdaf r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout.

Fix some compiler warnings for system() calls where we didn't used the
return code.  Add appropriate error messages and return with the error
code we got from system() or NT_STATUS_UNSUCCESSFUL.
2007-10-10 11:06:09 -05:00
Gerald Carter
939c3cb5d7 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)
2007-10-10 11:04:48 -05:00
Günther Deschner
afa8ae831a r8675: fix some compile warnings.
Guenther
2007-10-10 11:00:14 -05:00
Gerald Carter
9727d05241 r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 2007-10-10 10:57:02 -05:00
Gerald Carter
81c1ac255e r6940: fixing debug messages 2007-10-10 10:56:57 -05:00
Volker Lendecke
913c06ad3e r6900: Fix bug 2725. Thanks, John, for finding it.
Volker
2007-10-10 10:56:56 -05:00
Jeremy Allison
ee45f4b17e r6834: Fix bug #2703, found by John Antonishek <ant@nist.gov>. Add NULL
guard for disp_fields[0].
Jeremy.
2007-10-10 10:56:55 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Derrell Lipman
5b19ede88e r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags.

Temporarily defined -Wall to locate other potential problems.  Found an
unused static function (#ifdefed out rather than deleted, in case it's
needed for something in progress).

There are also a number of uses of undeclared functions, mostly krb5_*.
Files with these problems need to have appropriate header files included,
but they are not fixed in this update.

oplock_linux.c.c has undefined functions capget() and capset(), which need
to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>,
but that could potentially have other side effects, so that remains uncorrected
as well.

The flag -Wall should be added permanently to CFLAGS, and all warnings then
generated should be eliminated.
2007-10-10 10:56:24 -05:00
Gerald Carter
77734120d3 r5955: BUG 2517: use the realm from smb.conf for 'net ads info' when 'disable netbios = yes' 2007-10-10 10:56:11 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Jeremy Allison
b356a8fdc5 r3492: Fixes from testing kerberos salted principal fix.
Jeremy.
2007-10-10 10:53:07 -05:00
Jeremy Allison
0f3f7b035b r3273: Ensure we're consistent in the use of strchr_m for '@'.
Jeremy.
2007-10-10 10:53:03 -05:00
Tim Potter
7f161702fa r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
2007-10-10 10:52:55 -05:00
Günther Deschner
8836621694 r2832: Readd WKGUID-binding to match the correct default-locations of new
User-, Group- and Machine-Accounts in Active Directory (this got lost
during the last trunk-merge).

This way we match e.g. default containers moved by redircmp.exe and
redirusr.exe in Windows 2003 and don't blindly default to cn=Users or
cn=Computers.

Further wkguids can be examied via "net ads search wellknownobjects=*".
This should still keep a samba3-client joining a samba4 dc. Fixes
Bugzilla #1343.

Guenther
2007-10-10 10:52:54 -05:00
Günther Deschner
4886d6663d r2746: Fix typos in net's usage-output.
Guenther
2007-10-10 10:52:50 -05:00
Jim McDonough
edb4e940b4 r1750: This patch allows net ads lookup to rely on command line arguments if contacting an ADS server fails. This allows net ads lookup to work with clapd (very useful for testing).
from aliguori@us.ibm.com
2007-10-10 10:52:20 -05:00
Gerald Carter
837f56ec8b r1399: applying heimdal krb5 fixes from Guenther and fixing compile warnings in libadskerberos_keyatb.c 2007-10-10 10:52:10 -05:00
Jeremy Allison
464d2e9048 r1240: Ensure we don't shadow Heimdal globals.
Jeremy.
2007-10-10 10:52:02 -05:00
Jeremy Allison
ad440213aa r1222: Valgrind memory leak fixes. Still tracking down a strange one...
Can't fix the krb5 memory leaks inside that library :-(.
Jeremy.
2007-10-10 10:52:00 -05:00
Jeremy Allison
286f4c809c r1221: Added the last of the system keytab patch from "Dan Perry" <dperry@pppl.gov>,
fixed valgrind detected mem corruption in libads/kerberos_keytab.c.
Jeremy.
2007-10-10 10:52:00 -05:00
Tim Potter
cc9765ce97 Use possessive in message asking for user's password. -
Gerald Carter
d7b6298b9e fixing compile problems due to my recent ads.h changes -
Volker Lendecke
e6b4b956f6 Collecting some minor patches...
This adds the ability to specify the new user password for 'net ads password'
on the command line. As this needs the admin password on the command line, the
information leak is minimally more.

Patch from gd@suse.de

Volker
-
Volker Lendecke
94860687c5 Get rid of a const warning
Volker
-
Jim McDonough
8ef7ac22ef Fix bug 451. Stop net -P from prompting for machine account password.
Based on work by Ken Cross (kcross@nssolutions.com).
-
Gerald Carter
3913e43724 fixes for ads domain membership when only the realm is defined in
smb.conf

Fixes to ensure we work with disable netbios = yes
-
Gerald Carter
b1763ace4e 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.
-
Andrew Bartlett
96b4187963 - Make 'net' use a single funciton for setting the 'use machine account' code.
- Make winbindd try to use kerberos for connections to DCs, so that it can
   access RA=2 servers, particularly for netlogon.
 - Make rpcclient follow the new flags for the NETLOGON pipe
 - Make all the code that uses schannel use the centralised functions for doing so.

Andrew Bartlett
-
Jeremy Allison
879309671d Add a command line option (-S on|off|required) to enable signing on client
connections. Overrides smb.conf parameter if set.
Jeremy.
-
Andrew Bartlett
e6cc5ca780 Use the specified workgroup in 'net ads'. (Defaults to lp_workgroup()).
Andrew Bartlett
-
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-