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

801 Commits

Author SHA1 Message Date
Jeremy Allison
c61a230c5a Patch from Aurlien Degrmont <adegremont@idealx.com>. "entry" is dependent
on "result", don't free result first.
Jeremy.
-
Jeremy Allison
aa668a0206 If nothing to do, return success. Fix from Aur?lien Degr?mont <adegremont@idealx.com>
Jeremy.
-
Jeremy Allison
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
-
Andrew Bartlett
dfd6bef580 Match Samba 2.2, and make ACB_NORMAL the default ACB value.
(Samba 2.2 did this in the LDAP code, but it fits better as a generic thing)

Andrew Bartlett
-
Simo Sorce
c78f2d0bd1 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
couldn't compile to test these due to some kerberos problems wirh 3.0,
but on HEAD they're working well, so I suppose it's ok to commit
-
Jeremy Allison
8996c51770 Typo in error message.
Jeremy.
-
Jeremy Allison
bbc7b189b9 Portability fix from schmitz@hp.com (Joachim Schmitz). Bug #547.
Jeremy.
-
Volker Lendecke
227882d6f7 Make pdb_ldap.c compile with SUN iPlanet headers. Whether this works will be
tested soon, but this fix is somewhat obvious.

Volker
-
Jelmer Vernooij
2c584efae6 Fix a bug and warn when configuration file values are incorrect. Thanks to
Wilco Baan Hofman <wilco@andoburg.nl>
-
Alexander Bokovoy
b00a81b543 Fix pdb_mysql. Jelmer will look into details tonight. -
Jeremy Allison
cd7bd8c2da The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
-
Jeremy Allison
82f98b066d Oops. Proper fix for #470.
Jeremy.
-
Jeremy Allison
56df89eff3 Fix for #470 - unable to display SIDs in ACLs.
Jeremy.
-
Jelmer Vernooij
4765e56f92 Fix typo. Found by Aurelien Degremont -
Gerald Carter
eb02fcf3c2 remove getpwnam() calls from init_sam_from_xxx().
This means that %u & %g will no longer expand, but %U
and %G still do.  The payback is that winbindd local
accounts for users work with 'wbinfo -u' when winbind
is running on a PDC.
-
Jeremy Allison
910d21d316 Fix a nasty mess, and also bug #296. passdb/pdb_ldap.c was not converting
to/from utf8 for some calls. The libads code gets this right. Wonder why
the passdb code doesn't use it ?
Jeremy.
-
Volker Lendecke
5775690ee8 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
-
Jelmer Vernooij
9a603f6f07 Only set sids when they're retrurned by the MySQL query -
Jeremy Allison
f35e9a8b90 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.
-
Gerald Carter
3724063f15 remove 'ldap trust ids' since there was no way for it to work now -
Gerald Carter
780055f442 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.
-
Gerald Carter
f6363aa31a fix for BUG 245; make sure we set the sid type when falling back to the rid algorithm stuff -
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX -
Gerald Carter
a030fa373a 2 fixes
* bug #280 (my fault) - initialize sambaNextUserRid and
   sambaNextGroupRid

 * Unix users shared vis LDAP or NIS between a samba domain member
   of a Samba domain are not seen as domain users on the member servers.
   not as local users.
-
Gerald Carter
f6a01f5115 fix bug #281 by surrounding pdb_getgrgid() with become/unbecome_root() -
Gerald Carter
575483a1ef fix bug #208; have to get the gid of the user's primary group for %G -
Gerald Carter
4c36ef65e5 oops; fix typo. Noticed by gcc warning -
Gerald Carter
b947fc3eed fix bug #245; local_lookupsid() needed to make a getpwuid() call to get the username instead of making up unix_user.## -
Tim Potter
59dae1da66 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
-
Tim Potter
ba4d334b82 More printf fixes - size_t is long on some architectures. -
Gerald Carter
9f835b85dd convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
-
Gerald Carter
b8394a107d removing unused function -
Tim Potter
f93528ba00 Fixup a bunch of printf-style functions and debugs to use unsigned long when
displaying pid_t, uid_t and gid_t values.  This removes a whole lot of warnings
on some of the 64-bit build farm machines as well as help us out when 64-bit
uid/gid/pid values come along.
-
Rafal Szczesniak
b0be700605 This creates passdb backend files automatically when adding first account.
An extra message notifying that needed file didn't exist is displayed.
There's still a little catch with tdb backend, but it's better than it was,
from end-user's point of view.

This fixes #198


rafal
-
Volker Lendecke
defc71d4cb Fix memleak -
Volker Lendecke
922ec277d1 Fix two memleaks in pdb_ldap.c.
Whoever put the private.backend_private_data_free_fn thingy into
SAM_ACCOUNT, could you please revisit my change to pdb_get_set.c and
comment on my comment there?

Thanks,

Volker
-
Volker Lendecke
42a59d6910 Fix memleak -
Volker Lendecke
09e00970d4 typo -
Gerald Carter
837d7c54d3 fixes for 'net rpc vampire'. I can now take a blank Samba host
and migrate an NT4 domain and still logon from domain members
(tested logon scripts, system policies, profiles, & home directories)
(passdb backend = tdbsam)

removed call to idmap_init_wellknown_sids() from winbindd.c
since the local domain should be handled by the guest passdb backend
(and you don't really always want the Administrator account to be root)
...and we didn't pay attention to this anyways now.
-
Volker Lendecke
26134ac302 Fix memleaks -
Gerald Carter
399799c68c make sure to fallback to rid algoruthm for users not in smbpasswd (e.g. force user = foo) -
Simo Sorce
a926959391 use the specific funtion we have to check if a SID belong to our domain -
Volker Lendecke
d8695eccc7 Argl. Thinking twice and looking at the rest of callers of sid_compare_domain
proved the last patch wrong.

Sorry.

Volker
-
Volker Lendecke
39308ff138 We have an API to compare the domain parts of two SIDs, so use it.
Volker
-
Gerald Carter
8edf193722 fix sid_to_[uid|gid] (spotted by Volker).
Still testing this, but I'm checking it in
so Volker can test it as well.  Should be right.
-
Gerald Carter
5efa0d7cc2 fix unitialised variable -
Gerald Carter
0463045cc7 moving more code around.
* move rid allocation into IDMAP.  See comments in _api_samr_create_user()
  * add winbind delete user/group functions

I'm checking this in to sync up with everyone.  But I'm going to split
the add a separate winbindd_allocate_rid() function for systems
that have an 'add user script' but need idmap to give them a RID.
Life would be so much simplier without 'enable rid algorithm'.
The current RID allocation is horrible due to this one fact.
Tested idmap_tdb but not idmap_ldap yet.  Will do that tomorrow.

Nothing has changed in the way a samba domain is represented, stored,
or search in the directory so things should be ok with previous installations.

going to bed now.
-
Gerald Carter
66359531b8 i guess i'm the only one this ever annyoed...
fix the confusion when we tdb_lock_bystring() but
we retrieve an entry using tdb_fetch_by_string.
It's now always tdb.*bystring()
-
Jeremy Allison
6bd4788403 Fix up become_root/unbecome_root pairs needed around local passdb
lookups.
Jeremy.
-
Jeremy Allison
88135fbc49 Moved SAM_ACCOUNT marshall/unmarshall functions to make them externally
available. Removed extra auth_init (thanks metze).
Jeremy.
-