1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

11180 Commits

Author SHA1 Message Date
Andrew Bartlett
dcdc75ebd8 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
-
Jelmer Vernooij
83c7f1e166 Convert to popt. -
Jelmer Vernooij
a1576694a6 Use popt_common for -s, -d and -V -
Jelmer Vernooij
78e135cdb1 Don't duplicate the default group mapping functions - use the ones
from passdb
-
Volker Lendecke
6d3faeaef6 This does two things:
* pdbedit -i -e sets all SAM_ACCOUNT elements
  to CHANGED to satisfy the new pdb_ldap.c handling

* pdbedit -g transfers group mappings. I made this
  separate from the user database, as current installations
  have to live with a split backend.

  So, if you are running 3_0 alphas with LDAP as a backend
  and upgrade to the next 3_0 alpha, you should call

  pdbedit -i tdbsam -e ldapsam -g

  to transfer your group mapping database to LDAP.

  You certainly have to have all your groups as posixGroup
  objects in LDAP and adapt the LDAP schema before this
  call.

Volker
-
Volker Lendecke
a91af4bea8 The group mapping functions are not called
directly anymore, but instead through the passdb
interface. So we can make them static.

Volker
-
Volker Lendecke
353309e2a3 This adds 'ldap delete dn' as the recommended parameter
for the 'ldap del only sam attr' functionality. So
we are compatiple to the current SuSE patches as well
as to TNG... ;-)

Volker
-
Volker Lendecke
3a7d1e72e2 Metzes change:
> Hi Volker,
>
> if 'displayName' is not available we should fallback to 'cn' for map->nt_name
> 'cn' is used as unix group name by nss_ldap.
>
> and if nt_name is not available we should fail (so does this patch)

Volker
-
Andrew Bartlett
6509397f91 Patch from waider to update our samsync (net rpc vampire) code:
- Decode all the database names, even if we don't decode their contents
 - Update the 'set' code to match rpc_server/srv_samr_nt.c in only recording
   the difference between the old and new.

Andrew Bartlett
-
Jelmer Vernooij
818bc35da7 Don't declare variables after instructions -
Jelmer Vernooij
b46581ef15 We don't need optarg when we have popt -
Jelmer Vernooij
5f12b246b0 Convert to popt. -
Jelmer Vernooij
eeeeb37fc6 Use True, not TRUE -
Jelmer Vernooij
e7ed8bfc24 Fix typo in comment -
Jelmer Vernooij
8597b8cb95 Add minimum man page -
Jelmer Vernooij
633b3eb781 Convert to popt. -
Jelmer Vernooij
99de90adc9 Move -V to -C to prevent conflict with -V for version -
Jelmer Vernooij
33097cc661 Also move -V to -C in docs -
Jelmer Vernooij
b18d02891b Don't crash when initialising tdb fails -
Jelmer Vernooij
10c2fe08b6 Convert to popt. -
Jelmer Vernooij
8f285878b3 Convert to popt -
Jelmer Vernooij
e56ab71f12 Add nicer --help headers -
Jelmer Vernooij
5a88d78f67 Add -U, -N, -i, -A, -W to popt. -
Jelmer Vernooij
e149e70717 - Use FUNCTION_MACRO, not __FUNCTION__.
- Add some const
-
Andrew Bartlett
fb680f610c Valgrind found a few memory leaks!
Andrew Bartlett
-
Jelmer Vernooij
2e1e5719f1 Don't use EDQUOT on systems where it's not available -
Jelmer Vernooij
9c3b8533fc Detect missing -lroken properly on systems without krb5-config -
Jelmer Vernooij
0efa773bac Return value in non-void function -
Jelmer Vernooij
6df38e250a Use FUNCTION_MACRO, not __FUNCTION__ -
Volker Lendecke
582a34efbe Never touch complicated if/else/elsif structures :-)
This repairs domain join with fully existing wks-account which I broke
with my last patch...

Volker
-
Jelmer Vernooij
b757a43748 Don't use errno's when they're not available -
Volker Lendecke
f7149cf500 This changes the way we do LDAP updates. We don't use LDAP_MOD_MODIFY
anymore, but instead look at what is currently stored in the
database. Then we explicitly delete the existing attribute and add the
new value if it is not NULL or "". This way we can handle appearing
and disappearing attributes quite nicely.

This currently breaks pdbedit -o, as this does not set the CHANGED
flag on the SAM_ACCOUNT.

Jelmer suggested that we set all the fields on CHANGED in
context_add_sam_account. This sounds not too unreasonable.

Volker
-
Andrew Bartlett
3cddfe211d Revert bogus part of previous patch. -
Andrew Bartlett
a7eba37aad Small clenaup patches:
- safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

Andrew Bartlett
-
Andrew Bartlett
e8b4b13666 Fix compile on IA64 by noting that this should be the integer, not a pointer
to the integer for SIVAL().
-
Andrew Bartlett
b1b4370955 It seems that this causes some problems on some linux platforms - it's a
pity becouse otherwise you need to link a program with it to get the
fstring/pstring bugs.

Andrew Bartlett
-
Andrew Bartlett
552198b9e1 Patch from Jianliang Lu <j.lu@tiesse.com> to set the 'minimum password age'
when setting the password.

Andrew Bartlett
-
Jelmer Vernooij
1002b0bbff FALSE -> False (reported by Paul Green) -
Andrew Bartlett
05a63bd17e Clobber the 'SAFETY_MARGIN' in libsmb.
Andrew Bartlett
-
Andrew Bartlett
191b0ab4d7 Clobber our SMB buffers between packets. I hope this will help find bugs
where we assume the buffer is zero, when it might not be (ie due to, previous
packets).

Andrew Bartlett
-
Andrew Bartlett
23c7342bc4 Patch from colo (on IRC) to get libsmbclient building due to pstring/fstring
issues.

Also pick up these link failures at compile time (rather than runtime).

Andrew Bartlett
-
Jeremy Allison
301f17df51 Merge of new appliance-head scalable printing fixes.
Jeremy.
-
Jelmer Vernooij
72bb5615f3 Add more mappings to the nterr->errno mapping table. It should be fairly
complete now.
-
Andrew Bartlett
929213ff2a Give volker a hand, and let domain joins with existing user accounts work
a bit better.

This just sets the minimum possible attributes - if we are 'upgrading' an
LDAP based user account, the attributes will be there anyway.  This matches
NT pretty well to.

This also fixes some use of unitialised values in the desired_access checking.
(found by valgrind).

Andrew Bartlett
-
Jelmer Vernooij
228110e83f Only build pdb_ldap if both ldap libs and headers are found -
Volker Lendecke
d42eb2116d NT4 as well as W2k respond with IPC regardless of what service
type the client requested in the TCONX when connecting to IPC$.

It is very well possible that this also applies to the DISK and PRINTER
share types, not only IPC.

Found this while trying to join a HEAD domain from NT4SP6.

Volker
-
Jelmer Vernooij
ca066502a2 Patch from Samuel Thibault to convert messages from unix to dos charset. Works
on 2000.
sending messages to 9x needs to be fixed, but that didn't work anyway
-
Jelmer Vernooij
05b1681b03 Fix setOtherHelp() - pointed out by metze -
Jelmer Vernooij
3bad73ca87 Fix compile errors - don't use pstrcpy() on a fstring -
Jim McDonough
9387caf3ce use pstrcpy_base() -