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

1455 Commits

Author SHA1 Message Date
Andrew Bartlett
39d0a1b832 Move the code from lib/util_sid.c that deals with the global_sam_sid into
a file that is linked with the passdb.

This is to avoid linking insanity when this global becomes a self-initing
function.
(This used to be commit 743afd96cb)
2002-06-07 12:45:51 +00:00
Gerald Carter
aed3d69bc5 merge from 2.2
(This used to be commit ce2ddb7041)
2002-06-05 18:30:07 +00:00
Tim Potter
7841864940 Spelling fix.
(This used to be commit 39ec94bffe)
2002-06-05 07:11:22 +00:00
Jim McDonough
9a2261a92a Since includes.h isn't included here, VA_COPY has to be defined here. I don't
see any include file that is guaranteed to be here, so I'm defining it
locally.  Fixes AIX and Solaris builds.
(This used to be commit ca6bb47c22)
2002-06-03 13:37:52 +00:00
Andrew Tridgell
0bb6053946 put the ifdef for HAVE_VA_COPY in one place rather than in lots of
functions
(This used to be commit 1cf3228fdc)
2002-06-03 03:07:24 +00:00
Andrew Bartlett
e066e5e614 Updates to better report some NTSTATUS errors into PAM, and update to PAM
to correctly allow password changes on expired passwords.  (No security
implications, as its just a 'will I let you talk to the server' check).

pam_winbind checks the password prior to changing it, so that users don't
have to make up and type their new password when they havn't even got the
old one right.  This also helps with stacking etc.

Andrew Bartlett
(This used to be commit 2b78d49300)
2002-05-28 14:35:11 +00:00
Simo Sorce
34728ec659 move debug stuff from messages.c to debug.c (Elrond)
(This used to be commit 44df5a13bc)
2002-05-26 11:28:38 +00:00
Andrew Bartlett
20efe2fe6c Clean up a few unused functions, add a bit of static etc.
Importantly:

The removal of the silly 'delete user script' behaviour when secuity=domain.

I have left the name the same - as it still does the (previously documented,
but not in smb.conf(5)) sane behaviour of deleting users on request.

When we decide what to do with the 'add user' functionality, we might
rename it.

Andrew Bartlett
(This used to be commit cdcfe3671e)
2002-05-25 07:37:44 +00:00
Andrew Bartlett
fb70dbdffa Nobody uses this, and its really just a layer of internal implementation.
Make it static (till sombody needs its...)
(This used to be commit 89dc157320)
2002-05-23 14:24:59 +00:00
Jeremy Allison
a3c98a841b Merge of bugfixes from 2.2.
Jeremy.
(This used to be commit 5c8351228c)
2002-05-22 23:34:47 +00:00
Andrew Bartlett
b87eee9836 Add a bit more const, and kill of (finally!) sys_getpwnam and sys_getpwuid.
These might be reimplmented as simple pass-through functions, but all users
really should be doing 'getpwnam_alloc' or 'getpwuid_alloc' to ensure that
there are not shared static buffers.

I don't beleive we actually need a getpw*() cache inside samba - if we do
then I think we should look at our code design first.

(some of these changes are for platforms I don't have access to, but
they look sane)

Andrew Bartlett
(This used to be commit 9d8431b04f)
2002-05-22 12:44:45 +00:00
Andrew Bartlett
daec6cbbee Cleanups!
Make some code static, add some const to the PAM code, and make the plaintext
password code actually function - particulary without the requirement to
modify the 'struct passwd' (which it assumed was made up of fstrings)

This kills some particularly ugly code in lib/util_pw.c

Andrew Bartlett
(This used to be commit 302dad4990)
2002-05-22 12:14:28 +00:00
Andrew Bartlett
c2b867038a Fix a silly memory (getpnam_alloc()) leak spotted by Elrond, and move
the DATA_BLOB code into its own file.

It would be nice to go over some of the other util.c functions, and check
that we still use them all, and that we use them in more than one place.

Andrew Bartlett
(This used to be commit d0ea70fce5)
2002-05-22 11:25:43 +00:00
Gerald Carter
34278af77a merge from SAMBA_2_2
(This used to be commit 2424578c29)
2002-05-20 16:55:00 +00:00
Tim Potter
c523cce510 Fixed compiler warning.
(This used to be commit 793d9306e2)
2002-05-19 11:21:28 +00:00
Andrew Bartlett
80b22f6433 Keep the compiler happy
(This used to be commit 84ea2a434b)
2002-05-19 02:28:14 +00:00
Simo Sorce
2a02a76913 so here it is the code to introduce seriously debugggging classes.
this is a first step only passdb stuff has beein "classized".

 - so what can you do?
   set debug level to:  1 poasdb:10
   that will make all the code run at debug level 1 except the code in
   passdb/* files that will run at level 10
   TODO: fix the man page

 - also smbcontrol has this nice feature so smbcontrol smbd debug 3 passdb:5
   will set every smbd to have a default log level of 3 while passdb stuff
   will be at level 5

   and so no..

  minor cosmetic fix to pdbedit is there too
(This used to be commit be5c3b3f57)
2002-05-18 15:09:21 +00:00
Andrew Bartlett
ac03889168 Move client_receive_smb to clientgen.c as a static, as proposed by Elrond.
(only function that used it was unused, and this helps bring TNG and HEAD
closer)

Its also cleaner.

Andrew Bartlett
(This used to be commit 78f47c8333)
2002-05-18 13:19:38 +00:00
Andrew Bartlett
58e1fe62cc A few things in this commit:
cleanup some of the code in net_rpc_join re const warnings and
fstrings.

Passdb:

Make the %u and %U substituions in passdb work.
This is done by declaring these paramters to be 'const' and doing
the substitution manually.  I'm told this is us going full circle,
but I can't really see a better way.

Finally these things actually seem to work properly...

Make the lanman code use the pdb's recorded values for homedir etc
rather than the values from lp_*()

Add code to set the plaintext password in the passdb, where it can
decide how to store/set it.  For use with a future 'ldap password
change' option, or somthing like that...

Add pdb_unix, so as to remove the 'not in passdb' special cases from the
local_lookup_*() code.  Quite small, as it uses the new 'struct passwd ->
SAM_ACCOUNT' code that is now in just one place.  (also used by pdb_smbpasswd)

Other:
Fix up the adding of [homes] at session setup time to actually pass
the right string, that is the unix homedir, not the UNC path.

Fix up [homes] so that for winbind users is picks the correct name.
(bad interactions with the default domain code previously)

Change the rpc_server/srv_lsa_nt.c code to match NT when for the
SATUS_NONE_MAPPED reply:  This was only being triggered on
no queries, now it is on the 'no mappings' (ie all mappings failed).
Checked against Win2k.

Policy Question:  Should SID -> unix_user.234/unix_group.364 be
considered a mapping or not?  Currently it isn't.

Andrew Bartlett
(This used to be commit c28668068b)
2002-05-18 05:52:52 +00:00
Jim McDonough
27ecfceae1 Don't forget the semicolon, you fool!
(This used to be commit 1c9387330f)
2002-05-17 14:55:50 +00:00
Jim McDonough
c7523c5751 Fix usage of va_list passed as an arg. Use __va_copy before using it
when it exists.
(This used to be commit 85ab07bdc1)
2002-05-17 14:51:22 +00:00
Andrew Bartlett
e4672862fd Make Get_Pwnam use getpwnam_alloc() in an attempt to make it segfault rather
than allow silent reuse of stale static buffer.

Next step is to make this fn return that allocated buffer.
(This used to be commit e1daf816f3)
2002-05-17 14:19:36 +00:00
Andrew Bartlett
eed5094264 This removes --with-ssl from Samba.
This option was badly maintained, useless and confused our users and
distirbutors.  (its SSL, therfore it must be good...)

No windows client uses this protocol without help from an SSL tunnel.

I can't see any reason why setting up a unix-side SSL wrapper would
be any more difficult than the > 10 config options this mess added
to samba in any case.

On the Samba client end, I think the LIBSMB_PROG hack should be
sufficient to start stunnel on the unix side.  We might extend this
to take %i and %p (IP and port) if there is demand.

Andrew Bartlett
(This used to be commit b04561d3fd)
2002-05-17 12:42:39 +00:00
Jim McDonough
276e1928c4 Add __va_copy to talloc functions. talloc_asprintf was causing all kinds
of problems on Linux/390 systems...
(This used to be commit 2605e483b3)
2002-05-16 20:06:00 +00:00
Simo Sorce
282d069ff4 move vsyslog() from snprintf.c to replace.c
tx Elrond for prosecuting cleanness :)
(This used to be commit 2f30c2edfd)
2002-05-11 16:55:59 +00:00
Jeremy Allison
1bd3da9aef NT uses NT_STATUS_OBJECT_NAME_NOT_FOUND not NT_STATUS_NO_SUCH_FILE for ENOENT.
Jeremy.
(This used to be commit 2b49d727b0)
2002-05-09 17:44:42 +00:00
Jeremy Allison
30c80f90ad We were mapping the open of name1/name2 where name1 wasn't a directory
(ie. ENOTDIR) to the NT status code NT_STATUS_NOT_A_DIRECTORY. NT seems
to use NT_STATUS_OBJECT_PATH_NOT_FOUND. I'm hoping this will fix the
access binaries served from a Samba share bug...
Jeremy.
(This used to be commit 6f2b76c239)
2002-05-09 17:38:23 +00:00
Gerald Carter
27cd004bf2 merge from SAMBA_2_2
(This used to be commit c26ce496e8)
2002-05-09 17:35:42 +00:00
Gerald Carter
4db4e95ab2 pidfile merge from SAMBA_2_2 (including --with-fhs) and a few other minor things; compiles and shouldnt break, but needs testing
(This used to be commit 19b9b50d90)
2002-05-09 04:08:00 +00:00
Jeremy Allison
6337369a90 Merge in Jerry's called name fix.
Jeremy.
(This used to be commit 6d95792457)
2002-05-08 23:15:42 +00:00
Andrew Tridgell
193225dd42 patch from Alexander Bokovoy needed for dlopen on bsd systems
(This used to be commit 38fd99e841)
2002-04-24 11:43:02 +00:00
Jeremy Allison
ca2e14ddc3 We cannot set errno=0 in any of the wrapper calls as this breaks UNIX error
returns to the client.
Jeremy.
(This used to be commit 1d66e53a64)
2002-04-19 21:45:02 +00:00
Jeremy Allison
4f4d25d3e1 Fix different args to sys_fcntl without going varargs....
Jeremy.
(This used to be commit 65742067e0)
2002-04-19 17:30:27 +00:00
Jeremy Allison
8bc0e73a43 Fixed one more sendto.
Jeremy.
(This used to be commit 7adcc930ca)
2002-04-19 17:22:32 +00:00
Jeremy Allison
b63be4e1ab Added sys_fcntl (not to be used everywhere). Added sys_read/sys_write
for transfer_file.
Jeremy.
(This used to be commit c7ff521bab)
2002-04-19 03:05:38 +00:00
Jeremy Allison
e762f93821 Fixed sendto in oplock code.
Jeremy.
(This used to be commit 64974fa334)
2002-04-19 02:20:04 +00:00
Jeremy Allison
e41915d7c8 Fix send and recvfrom.
Jeremy.
(This used to be commit 8cbc24c3bd)
2002-04-19 02:15:10 +00:00
Jeremy Allison
302b581ddc First cut at fix for the EINTR problem... More needs to be done I think.
Jeremy.
(This used to be commit 48475a7a69)
2002-04-19 02:08:52 +00:00
Andrew Tridgell
6a9bc86d62 nicer strndup() function
(This used to be commit 546764f3cb)
2002-04-18 03:59:02 +00:00
Andrew Tridgell
e35ac78c49 make suure we get the return value from the pull_*() functions right
for both null terminated and buffer length terminated strings
(This used to be commit e8fbf853e0)
2002-04-17 02:37:46 +00:00
Simo Sorce
1416106736 sync with 2.2
(This used to be commit 18d5ffd835)
2002-04-16 22:56:08 +00:00
Andrew Tridgell
7c0301d100 stricter conditions on termination in strings
this was a very nasty bug with filename corruption and NT4 clients. The
exact termination conditions are quite critical ...
(This used to be commit a538efe7d0)
2002-04-16 22:55:39 +00:00
Simo Sorce
a32940d53e Fix incorrect zpadlen handling in fmtfp.
Thanks to Ollie Oldham <ollie.oldham@metro-optix.com> for spotting it.
few mods to make it easier to compile the tests.
addedd the "Ollie" test to the floating point ones.
(This used to be commit 415f9d92bc)
2002-04-16 22:38:04 +00:00
Andrew Tridgell
b66932e1a5 fixed the handling of STR_TERMINATE
(This used to be commit dbc6b137a8)
2002-04-16 12:07:12 +00:00
Andrew Tridgell
02f84c6bd0 i forgot to commit these parts of the string handling patch earlier. Sorry.
(This used to be commit bac0093a97)
2002-04-16 10:40:23 +00:00
Tim Potter
36514b65ee Fixed incorrect debug.
(This used to be commit 3b6df44ddc)
2002-04-15 01:55:57 +00:00
Andrew Bartlett
07e6ff5fcf Partly based on the work by mimir (Rafal Szczesniak
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly
enumerate its trusted domains - by exaimining the keys in the secrets.tdb file.

This patch has been tested with both NT4 and rpcclient/wbinfo, and adds
some extra functionality to talloc and rpc_parse to allow it to deal with
already unicode strings.

Finally, this cleans up some const warnings that were in net_rpc.c by pushing
another dash of const into the rpc client code.

Andrew Bartlett
(This used to be commit 0bdd94cb99)
2002-04-14 09:44:16 +00:00
Andrew Bartlett
163a855d26 Better handling of uid/gid -> RID and RID -> uid/gid code.
All uids and gids must create valid RIDs, becouse other code expects this, and
can't handle the failure case. (ACL code in particular)

Allow admins to adjust the base of the RID algorithm, so avoid clashes with
users brought in from NT (for example).

Put all the algorithm code back in one place, so that this change is global.

Better coping with NULL sid pointers - but it still breaks a lot of stuff.

BONUS: manpage entry for new paramater :-)

counter based rids for normal users in tdbsam is disabled for the timebeing,
idra and I will work out some things here soon I hope.

Andrew Bartlett
(This used to be commit 5275c94cdf)
2002-04-13 09:35:52 +00:00
Andrew Tridgell
5928c293ff added strndup() for systems that don't have it
(This used to be commit 7e92fb7453)
2002-04-11 15:27:22 +00:00
Andrew Tridgell
714518e550 this adds a completely new hash based mangling scheme
the hash for this scheme is *much* larger (approximately 31 bits) and
the code is written to be very fast, correctly handling multibyte
while not doing any actual multi-byte conversions in the vast majority
of cases

you can select this scheme using "mangling method = hash2", although I
may make it the default if it works out well.
(This used to be commit bb173c1a7e)
2002-04-11 09:56:38 +00:00
Tim Potter
0227568209 Also look for libinsure.so where the full version installs it.
(This used to be commit 2bf6595a2a)
2002-04-04 04:54:44 +00:00
Andrew Tridgell
6bd2b496ed cope with a missing PAM define
(This used to be commit e5c3648fe7)
2002-04-01 07:16:06 +00:00
Jeremy Allison
0cb0c6e903 Added sys_adminlog() system for info the appliance admins really
need to know about. Different from the DEBUG system.
Jeremy.
(This used to be commit 74eac41c68)
2002-03-27 23:17:50 +00:00
Jeremy Allison
7d7c594644 Removed HAVE_LIBDL from most places (except system.c). Added checks for
dlopen & friends into configure.in. This should help building on *BSD
where dl*** calls are in libc.
Jeremy
(This used to be commit ac1baba35d)
2002-03-27 03:00:39 +00:00
Jeremy Allison
0d87fb91c4 Allow hosts allow/deny to use xx.xx.xx.xx/yy syntax.
Jeremy.
(This used to be commit ea60c50109)
2002-03-27 01:56:31 +00:00
Jeremy Allison
752324ee1a In msleep - never sleep for more than 1 second. Cope with time changes.
Jeremy.
(This used to be commit 9fb6a47526)
2002-03-27 00:39:26 +00:00
Jeremy Allison
94c52a0052 Moved debug messages for grabbing/releasing mutex.
Jeremy.
(This used to be commit e144c174ea)
2002-03-27 00:02:49 +00:00
Jeremy Allison
64d20453d9 Don't hold the mutex for more than 20 seconds.
Jeremy.
(This used to be commit 1b9f1a368f)
2002-03-26 22:36:27 +00:00
Gerald Carter
737423f06e OpenPrinter() merge from 2.2
(This used to be commit 619397cc90)
2002-03-26 03:15:30 +00:00
Andrew Bartlett
62098eade3 add {push,pull}_ucs2{allocate,talloc}() functions.
Andrew Bartlett
(This used to be commit ce7990b4a4)
2002-03-25 07:41:42 +00:00
Tim Potter
1d582af3c0 Spelling fixes.
(This used to be commit a5ac2ac4ad)
2002-03-24 23:25:05 +00:00
Andrew Bartlett
33dd512896 Make a number of the lookup tables 'const'. I'm told this assists in sharing
memory between users of shared libs.

Andrew Bartlett
(This used to be commit 41dd5a4d29)
2002-03-23 08:45:03 +00:00
Andrew Bartlett
d6d9d6debd Update some of the DEBUG()s in Get_Pwnam_internal()
Andrew Bartlett
(This used to be commit 20f6f9e3a2)
2002-03-23 08:40:15 +00:00
Andrew Bartlett
fbdf45721b Patch from Hasch@t-online.de (Juergen Hasch) to add allocate and talloc
push/pull utf8 functions.  To be used for international ADS support.

Andrew Bartlett
(This used to be commit 9ab144810e)
2002-03-23 08:39:04 +00:00
Jeremy Allison
c90cd26e94 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
(This used to be commit 3b1b8ac435)
2002-03-23 02:57:44 +00:00
Tim Potter
ce236d1dbf Stomped on some header file version numbers that have crept back in.
(This used to be commit e66bdf1229)
2002-03-22 06:24:38 +00:00
Herb Lewis
55058b074f must use native endian index when creating default valid.dat table so it
is the same on big and little endian systems.
(This used to be commit 6fa09ee881)
2002-03-21 14:01:57 +00:00
Martin Pool
75722fa183 Add assertions that kill() is never accidentally passed a non-positive
pid.  This follows a bug in rsync where it would accidentally
kill(-1), removing all the user's processes.  I can't see any way this
would directly happen in Samba, but having the assertions seems
beneficial.

http://cvs.samba.org/cgi-bin/cvsweb/rsync/util.c.diff?r1=1.108&r2=1.109&f=h
(This used to be commit 098905bea2)
2002-03-20 06:57:03 +00:00
Jeremy Allison
ffadd471b9 Sync up vfs changes from 2.2.x.
Jeremy.
(This used to be commit ad1e858d8e)
2002-03-19 02:32:39 +00:00
Simo Sorce
32334bc655 more verbose checking in talloc and util_pw
fixed tdbsam memory corruption (and segfault)
reducing calls to pdb_uid_to_user_rid and countrary to 0 to move to a non alghoritmic rid allocation with some passdb modules.
(This used to be commit 9836af7cd6)
2002-03-18 23:57:14 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed4)
2002-03-17 04:36:35 +00:00
Andrew Tridgell
079334a431 lower the debug level of failing to map a file
(This used to be commit ad9965414d)
2002-03-15 09:19:07 +00:00
Gerald Carter
65c007b583 syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
(This used to be commit 5760315c1d)
2002-03-15 08:14:10 +00:00
Tim Potter
57bd576445 getpid() -> sys_getpid()
(This used to be commit a3cea5e9ae)
2002-03-14 01:53:04 +00:00
Jeremy Allison
dac047366a Add "Creator Group" - was in 2.2.x and I'm syncing up the two.
Jeremy.
(This used to be commit bcf38961a7)
2002-03-13 01:29:30 +00:00
Martin Pool
a984db9723 Fix typo.
(This used to be commit 58c1b11439)
2002-03-10 03:14:00 +00:00
Andrew Tridgell
683ba419ff add a note about the meaning of global_sam_sid
(This used to be commit 3db97530b6)
2002-03-10 01:51:15 +00:00
Tim Potter
d0f80d2c41 Doc.
(This used to be commit b9ab79f30a)
2002-03-09 09:48:35 +00:00
Herb Lewis
99c4646a19 fixed the upper/lower case table generation on big-endian machines
(tridge, using Herbs console)
(This used to be commit e5d80779a3)
2002-03-06 20:38:51 +00:00
Jeremy Allison
a2b95edf7f dos2unix not used in HEAD anymore.
Jeremy.
(This used to be commit d2af6382b4)
2002-03-04 18:06:54 +00:00
Andrew Bartlett
e4235f6b84 Fix up the pull_utf8_fstring/pstring functions, and add their push eqivilants.
patch by Hasch@t-online.de (Juergen Hasch)

Andrew Bartlett
(This used to be commit ba2570f518)
2002-03-01 01:11:02 +00:00
Andrew Bartlett
121d3238d7 This should kill off the 'cannot convert' error messages on non-iconv hosts.
(This used to be commit 2a30960276)
2002-03-01 00:57:47 +00:00
Andrew Bartlett
f8711444cf Make this function static
(This used to be commit 85974e6c43)
2002-02-27 11:47:33 +00:00
Jeremy Allison
62299aa747 bcopy must DIE ! Stop people creeping use of bcopy back into the code
(and yes I know who you are..... :-).
Jeremy.
(This used to be commit 330b0df960)
2002-02-26 17:40:43 +00:00
Jeremy Allison
de494520b0 Only set smb_read_error if not already set.
Jeremy.
(This used to be commit 8220135fd1)
2002-02-23 21:03:21 +00:00
Andrew Bartlett
5294b48bb8 Thanks to David Edward Shapiro <David.Edward.Shapiro@btitele.com> for spotting
this!

(groupname and domain name paramaters swapped, giving 'interesting' results...)

Andrew Bartlett
(This used to be commit 5aed3759d8)
2002-02-20 21:36:12 +00:00
Andrew Bartlett
efa1571b8b Patch from Hasch@t-online.de (Juergen Hasch) to add UTF-8 as an explict
character set for conversion.  To be used in Winbind and the 'net ads'
commands.

Andrew Bartlett
(This used to be commit fa9d3060ff)
2002-02-19 23:02:39 +00:00
Andrew Tridgell
c2729d59a6 serialise all domain auth requests
this is needed because W2K will send a TCP reset to any open
connections that have not done a negprot when a second connection is
made. This meant that under heavy netlogon load a Samba domain member
would fail authentications.

Jeremy, you may wish to port this to 2.2.x
(This used to be commit eb196070e6)
2002-02-18 11:07:57 +00:00
Andrew Tridgell
1736b99a50 reverted tims patch that broke configure
why does anything but smbd care about sec_init() anyway??
(This used to be commit 569505b771)
2002-02-18 10:23:02 +00:00
Tim Potter
606fdc7c5c Whoops, typo.
(This used to be commit e7abb79fb3)
2002-02-17 18:56:30 +00:00
Tim Potter
d159876d64 Do a smb_panic() if sec_initial_[ug]id() or non_root_mode() is called
without before sec_init().  This should avoid the formation of another
magic function club.  (-:
(This used to be commit 1b941e2c63)
2002-02-17 18:32:59 +00:00
Tim Potter
e1a65ecd0d int -> uint32
(This used to be commit 5efe39af0c)
2002-02-17 18:30:01 +00:00
Martin Pool
ae9bac99fa Back out 1.16.2.3:
receive_smb: You might think that we ought to set smb_read_error here,
but apparently that breaks the recursive main loop in oplock.c.
Global variables suck. :-/
(This used to be commit b6d5d02aa1)
2002-02-15 22:20:08 +00:00
Andrew Bartlett
72b1011cb2 Try to get this finally working. (Note to self: *always* check build farm...)
:-)

Andrew Bartlett
(This used to be commit 542e0e3745)
2002-02-06 20:31:26 +00:00
Andrew Bartlett
db0d2f8d60 See if we can get slightly valid C for the non-PAM case here.
Andrew Bartlett
(This used to be commit 59afc3d6da)
2002-02-05 21:05:04 +00:00
Andrew Bartlett
ed389ee8dc Drastic impromvents to pam_winbind.
This adds code to do generic PAM -> NTSTATUS and NTSTATUS -> PAM error
conversions, and uses them to make the error handling in pam_winbind sane.

In particular, pam_winbind now uses PAM error codes, not silly '-1, -2 ...'
stuff, and logs the NTSTATUS error that winbind now sends over the pipe.

Added code to wbinfo to display these - makes a big difference in debugging
winbindd.

The main change here is the code to allow pam_winbind password changing to
correctly stack - This code ripped from pam_unix, and the copyright attached.
(Same as for all pam modules, including pam_winbind)

Andrew Bartlett
(This used to be commit dc1a72f896)
2002-02-05 09:40:36 +00:00
Jeremy Allison
7d9c3b7f75 Fix stupid typo !
Jeremy.
(This used to be commit d1e911afd0)
2002-02-05 02:40:16 +00:00
Simo Sorce
407cd42143 better debug messages!
(This used to be commit e3bb686745)
2002-02-04 00:59:23 +00:00
Jeremy Allison
69adbb0ce3 Fix from Michael Steffens <michael_steffens@hp.com> to make signal
processing work correctly in winbindd. This is a really good patch
that gives full select semantics to the Samba modified select.
Jeremy.
(This used to be commit 3af16ade17)
2002-01-31 23:26:12 +00:00
Andrew Tridgell
b48750fba6 this fixes the problem of not being able to add a SD to a file on a
non-domain Samba server from a NT4 client.

Note that this exactly reverses a change by Jeremy on the 18th of
December 2001, reverting the code back to what JF originally wrote. I
have looked carefully with a sniffer and JFs original NULL sid is
correct (ie. it matches what NT4 does) and also fixes the problem.

Sending a blank sid (which is what jeremy's patch did) causes NT4 to
give a classic "parameter is incorrect error" and prevents the
addition of new ACLs.
(This used to be commit 9930cf9733)
2002-01-31 09:37:26 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Simo Sorce
c889c29d0d minor fix and checks
(This used to be commit a034bfb9ef)
2002-01-27 16:37:12 +00:00
Andrew Bartlett
7b671e34f5 Some more 'winbind default domain' support patches from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>.

This patch is designed to remove the 'special cases' required for this support.

In particular this now kills off winbind_initgroups, as it appears no longer to
be required.

Andrew Bartlett
(This used to be commit f1d8d50976)
2002-01-27 12:12:22 +00:00
Andrew Bartlett
670f46fd4c Bring this code into line with new winbind_lookup_name() interface. I think
this might need a bit more work - or at least documentation.

This is certainly a worthwile little hack, as it avoids the need to invert the
group database.  I don't think we should allow unqualified domains here - as
that allows us to distinguish between (at least some) usernames and these
'special' groups.
(This used to be commit 151dd7bc6c)
2002-01-26 10:10:25 +00:00
Andrew Bartlett
88ed747e29 Remove the 'direct to winbind' hacks, as they should (if I understand
correctly) be no longer needed.  This is in aid of the 'winbind default domain'
code - which works much better when smbd always goes via the standard unix
interfaces.

Andrew Bartlett
(This used to be commit a41fe2f6c8)
2002-01-26 09:50:28 +00:00
Jean-François Micouleau
b387638d48 picky about realloc
J.F.
(This used to be commit 873dba59cf)
2002-01-25 17:02:54 +00:00
Simo Sorce
114eaabdcb minor fixes
(This used to be commit 04f492980b)
2002-01-25 00:35:14 +00:00
Andrew Bartlett
158efc3aa2 getpwnam -> getpwnam_alloc.
idra has promised not to revert these this time :-)
(This used to be commit f556ad67e8)
2002-01-23 12:59:24 +00:00
Martin Pool
c4fe824c42 We have to do some initialization before the string conversion
routines can work.  The code was copied into both convert_string and
convert_string_allocate -- I split it into a little static function,
and removed an apparently duplicate call to init_valid_table().
(This used to be commit 7f7d22880d)
2002-01-22 03:51:28 +00:00
Tim Potter
a45dbdd722 Added comment about running lp_load() before calling pidfile_create().
(This used to be commit e05c9b34f0)
2002-01-22 00:35:51 +00:00
Tim Potter
50648ac3cc Having a const parameter for set_socket_options() causes too much confusion.
(This used to be commit 025a0ea8ba)
2002-01-22 00:31:41 +00:00
Jeremy Allison
71bc6b9af2 Removed freebsd hack. Not correct.
Jeremy.
(This used to be commit 61b4ce7aef)
2002-01-21 23:36:47 +00:00
Tim Potter
fb76d58d16 Spelling fix.
(This used to be commit 6380f9ff7a)
2002-01-21 06:12:22 +00:00
Andrew Bartlett
bb6af711b8 This is the current patch from Luke Leighton <lckl@samba-tng.org> to add a
degree of seperation betwen reading/writing the raw NamedPipe SMB packets
and the matching operations inside smbd's RPC components.

This patch is designed for no change in behaviour, and my tests hold that to be
true.  This patch does however allow for the future loadable modules interface
to specify function pointers in replacement of the fixed state.

The pipes_struct has been split into two peices, with smb_np_struct taking the
information that should be generic to where the data ends up.

Some other minor changes are made: we get another small helper function in
util_sock.c and some of the original code has better failure debugs and
variable use. (As per on-list comments).

Andrew Bartlett
(This used to be commit 8ef13cabdd)
2002-01-20 02:40:05 +00:00
Andrew Bartlett
93a8358910 This patch makes the 'winbind use default domain' code interact better with
smbd, and also makes it much cleaner inside winbindd.

It is mostly my code, with a few changes and testing performed by Alexander
Bokovoy <a.bokovoy@sam-solutions.net>.  ab has tested it in security=domain and
security=ads, but more testing is always appricatiated.

The idea is that we no longer cart around a 'domain\user' string, we keep them
seperate until the last moment - when we push that string into a pwent on onto
the socket.

This removes the need to be constantly parsing that string - the domain prefix
is almost always already provided, (only a couple of functions actually changed
arguments in all this).

Some consequential changes to the RPC client code, to stop it concatonating the
two strings (it now passes them both back as params).

I havn't changed the cache code, however the usernames will no longer have a
double domain prefix in the key string.  The actual structures are unchanged
 - but the meaning of 'username' in the 'rid' will have changed.  (The cache is
invalidated at startup, so on-disk formats are not an issue here).

Andrew Bartlett
(This used to be commit e870f0e727)
2002-01-20 01:24:59 +00:00
Jeremy Allison
74462c0c17 Readline has problems on non tty fd's. Use readline replacement to in cases
where stdin is !isatty to allow stripts to work.
Jeremy.
(This used to be commit 997d6687fc)
2002-01-19 22:54:13 +00:00
Jeremy Allison
4668960b1d Added #ifdef for FreeBSD TCP bug.
Jeremy.
(This used to be commit 80df5ab07e)
2002-01-19 21:37:38 +00:00
Simo Sorce
7019bfe546 fixes (asprintf) from 2.2
(This used to be commit 6b123adda9)
2002-01-19 17:29:32 +00:00
Jeremy Allison
a0b86d4cd2 If 127.0.0.1 matches both allow & deny then allow. Patch from Steve Langasek vorlon@netexpress.net
Jeremy.
(This used to be commit 478696e924)
2002-01-18 03:08:40 +00:00
Andrew Bartlett
1fb9ccc4e2 This is the 'winbind default domain' patch from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>.

The idea is the domain\username is rather harsh for unix systems - people don't
expect to have to FTP, SSH and (in particular) e-mail with a username like
that.

This 'corrects' that - but is not without its own problems.

As you can see from the changes to files like username.c and wb_client.c (smbd's
winbind client code) a lot of assumptions are made in a lot of places about
lp_winbind_seperator determining a users's status as a domain or local user.

The main change I will shortly be making is to investigate and kill off
winbind_initgroups() - as far as I know it was a workaround for an old bug in
winbind itself (and a bug in RH 5.2) and should no longer be relevent.

I am also going to move to using the 'winbind uid' and 'winbind gid' paramaters
to determine a user/groups's 'local' status, rather than the presence of the
seperator.

As such, this functionality is recommended for servers providing unix services,
but is currently less than optimal for windows clients.

(TODO: remove all references to lp_winbind_seperator() and
lp_winbind_use_default_domain() from smbd)

Andrew Bartlett
(This used to be commit 07a21fcd23)
2002-01-18 02:37:55 +00:00
Andrew Bartlett
c311d24ce3 A nice *big* change to the fundemental way we do things.
Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps
them around for a long time - often past the next call...

This adds a getpwnam_alloc and a getpwuid_alloc to the collection.

These function as expected, returning a malloced structure that can be
free()ed with passwd_free(&passwd).

This patch also cuts down on the number of calls to getpwnam - mostly by
taking advantage of the fact that the passdb interface is already
case-insensiteve.

With this patch most of the recursive cases have been removed (that I know
of) and the problems are reduced further by not using the sys_ interface
in the new code.  This means that pointers to the cache won't be affected.
(This is a tempoary HACK, I intend to kill the password cache entirly).

The only change I'm a little worried about is the change to
rpc_server/srv_samr_nt.c for private groups.  In this case we are getting
groups from the new group mapping DB.  Do we still need to check for private
groups?  I've toned down the check to a case sensitve match with the new code,
but we might be able to kill it entirly.

I've also added a make_modifyable_passwd() function, that copies a passwd
struct into the form that the old sys_getpw* code provided.  As far as I can
tell this is only actually used in the pass_check.c crazies, where I moved
the final 'special case' for shadow passwords (out of _Get_Pwnam()).

The matching case for getpwent() is dealt with already, in lib/util_getent.c

Also included in here is a small change to register the [homes] share at vuid
creation rather than just in one varient of the session setup.  (This picks
up the SPNEGO cases).  The home directory is now stored on the vuid, and I
am hoping this might provide a saner way to do %H substitions.

TODO:  Kill off remaining Get_Pwnam_Modify calls (they are not needed), change
the remaining sys_getpwnam() callers to use getpwnam_alloc() and move
Get_Pwnam to return an allocated struct.

Andrew Bartlett
(This used to be commit 1d86c7f942)
2002-01-17 08:45:58 +00:00
Jeremy Allison
08019e8a33 Separate out get_user_home_dir() from get_user_home_service_dir().
Jeremy.
(This used to be commit c1b97226db)
2002-01-16 23:53:10 +00:00
Jeremy Allison
5cf6457bcc Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2.
Jeremy.
(This used to be commit 0fcca6c627)
2002-01-16 23:32:10 +00:00
Jeremy Allison
04ec469c72 Fixup error mapping so we have only one table containing errno -> dos error -> NT STATUS
maps. Fixes problem with disk full returning incorrect error.
Jeremy.
(This used to be commit 16fcbf3c1c)
2002-01-16 21:27:57 +00:00
Martin Pool
fed604bfa3 Roll back PSTRING_SANCTIFY patch; just leave non-controversial type
and constness changes.
(This used to be commit cee0ec7274)
2002-01-16 02:42:07 +00:00
Martin Pool
17745322ab #ifdef variable that's not used without dmalloc
(This used to be commit bf513668cb)
2002-01-15 01:49:06 +00:00
Martin Pool
df3d5b3556 Add constness to filenames passed to functions.
(This used to be commit 8d106dc1f4)
2002-01-15 01:37:12 +00:00
Martin Pool
3353223b47 FIXME We should turn the global list off when using Insure++,
otherwise all the memory will be seen as still reachable.
(This used to be commit 682e7cd394)
2002-01-14 06:51:34 +00:00
Andrew Bartlett
f7a657721a A couple of coding syle updates to follow the re-indent.
(This used to be commit 7417d6f931)
2002-01-13 12:37:01 +00:00
Andrew Bartlett
fef35c5ce0 Re-indent these two functions to make it actually possible to understand their
contents...

Andrew Bartlett
(This used to be commit e20d69d518)
2002-01-13 12:33:42 +00:00
Andrew Bartlett
0d1ecbbb73 I'm doing some things towards the NamedPipes game with lckl and he has asked me
to move this from being a static to matching its mate in lib/util_sock.c.

In any case, this should discorage anybody from using the 'wrong' version of
this function.  (ie the one from TNG, which needs a bit more error checking
depending on use).

Andrew Bartlett
(This used to be commit e6a3a01f79)
2002-01-13 11:13:54 +00:00
Jeremy Allison
1d40138232 Round and round we go....
Jeremy.
(This used to be commit 2603ab3c68)
2002-01-11 23:33:12 +00:00
Jeremy Allison
b741f6b04c Latest attempt at changeid.
Jeremy.
(This used to be commit 24ee18c77e)
2002-01-11 21:52:46 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Tim Potter
cd1ad031a6 Spelling fix.
(This used to be commit 85d3ffb270)
2002-01-10 06:05:37 +00:00
Jeremy Allison
3454945146 Getting ready to add UNIX extensions in HEAD also.
Jeremy
(This used to be commit 6210d4aa19)
2002-01-10 00:28:09 +00:00
Martin Pool
6c7050ea95 Add two more memory-debug smbcontrol messages: these ones should
prompt dmalloc to log information about what happening, so you can see
in flight why smbd is getting bloated.
(This used to be commit bcb443c5c4)
2002-01-09 08:27:15 +00:00
Martin Pool
e4bf9af03c Add UNUSED(paramname) macro to be used in parameter lists, to quieten
gcc warnings about unused parameters.

msg_pool_usage: assert msg_type is as expected.
(This used to be commit 3ef135e91a)
2002-01-09 05:27:27 +00:00
Martin Pool
0e0c24b40d Add harmless parentheses so that dmalloc doesn't get confused by a
variable called 'free'.
(This used to be commit a823e3f8b2)
2002-01-09 05:09:44 +00:00
Jeremy Allison
91536cc901 Fixed all uses of tdb_fetch/store/_int to use explicit int32 little endian
in tdb's. All except winbindd_idmap.... Hmmmmmm.
Jeremy.
(This used to be commit ec71f1732b)
2002-01-09 04:13:30 +00:00
Herb Lewis
f1256e847e merge changes from 2.2 branch to prevent smb.conf from changing debug level
of commands when specified on command line.
(This used to be commit 39d6b31e14)
2002-01-07 21:32:22 +00:00
Andrew Tridgell
b0e4827b97 simple fix for creating blank data blobs
(This used to be commit 08bb2dfec2)
2002-01-05 23:30:59 +00:00
Andrew Bartlett
5a9c2f74ab Add a talloc varient of the data_blob functions.
Also change the structure so it has its own (optional) 'free' pointer - so we
don't free() a talloc'ed version.

also split out the data_blob_clear() functionaility.

Andrew Bartlett
(This used to be commit 207ee8aac4)
2002-01-05 04:23:12 +00:00
Jeremy Allison
eca99f5c22 Fixed nasty cast of tdb_delete in traversals.
Jeremy.
(This used to be commit a0cdec3acc)
2002-01-03 22:48:48 +00:00
Jeremy Allison
35fff73f10 Don't use static memory, malloc it...
Jeremy.
(This used to be commit 8aee8211cd)
2002-01-03 21:48:17 +00:00
Jeremy Allison
894e87cb32 Fix the fix.... (sigh).
Jeremy.
(This used to be commit 73cf9d04f6)
2002-01-03 21:37:45 +00:00
Jeremy Allison
791433434e Fixed embarressing 16k strack trashing bug :-(.
Jeremy.
(This used to be commit b52c3219d6)
2002-01-03 19:57:12 +00:00
Martin Pool
5c1cb14d3e Make talloctort call talloc_describe_all before exiting
(This used to be commit 4877501da9)
2002-01-03 05:57:02 +00:00
Martin Pool
cfec6d4498 Cope nicely with pools with no name.
(This used to be commit 86abefc172)
2002-01-03 05:52:27 +00:00
Martin Pool
e28cdc0931 talloc accounting now includes number of chunks and bytes allocated.
(This used to be commit cd25d01e42)
2002-01-03 05:34:33 +00:00
Martin Pool
588a59b505 Send back talloc allocation information when POOL_USAGE is received.
(This used to be commit 7cb8e95f93)
2002-01-03 05:26:57 +00:00
Martin Pool
3c2b7777ed Add talloc_asprintf_append, which grows an existing string buffer to
contain new print-formatted information.  (Also
talloc_vasprintf_append.)  Idea borrowed from glib.
(This used to be commit 53723e8748)
2002-01-03 05:25:30 +00:00
Martin Pool
9c409a9e39 smbd now sends a reply to MSG_REQ_POOL_USAGE, though it's pretty
boring so far.
(This used to be commit 9b217dce7f)
2002-01-03 04:22:55 +00:00
Martin Pool
91ec6cf19f smbd should register to receive MSG_REQ_POOL_USAGE. Response should
be information about memory usage, but this is not done yet.
(This used to be commit 830a126a44)
2002-01-03 03:53:41 +00:00
Martin Pool
1a09c706fc If we receive a message that is not handled then emit a gentle warning
to the log.
(This used to be commit 53dd8b4539)
2002-01-03 03:42:33 +00:00
Martin Pool
07a6e0d311 debug output on receipt of message.
(This used to be commit 6bd5b7ce8e)
2002-01-03 03:35:02 +00:00
Simo Sorce
f30dd2ec5b const religion
(This used to be commit c0904d9617)
2001-12-31 15:48:32 +00:00
Andrew Tridgell
84ecd95dba more irix -64 portability fixes
(This used to be commit 65e857b36e)
2001-12-31 14:05:22 +00:00
Andrew Tridgell
eb4e101153 - portablitity fixes for cc -64 on irix
- fixed gid* bug in rpc_server
(This used to be commit 48aa90c48c)
2001-12-31 13:46:26 +00:00
Simo Sorce
78528b4ec6 freeing the wrong pointer, sorry my mistake.
(This used to be commit ce7e89949a)
2001-12-30 22:55:04 +00:00
Simo Sorce
0608a60390 util_sid.c - respect a const variabile (addedd strdup)
cli_reg.c  - indentation
pdb_ldap.c - some checks on init fns parameters
pdb_tdb.c  - some checks on init fns parameters + make sure we close the db on failure
(This used to be commit 49f5cb7a3d)
2001-12-30 19:21:25 +00:00
Andrew Tridgell
a237a8a296 fixed a typo in vsyslog()
(This used to be commit da353bc539)
2001-12-21 11:04:14 +00:00
Martin Pool
bf65820af2 Add an output parameter to message_send_all that says how many
messages were sent, so you know how many replies to expect.

Const and doc religion.
(This used to be commit 22e510ea0d)
2001-12-21 00:37:49 +00:00
Andrew Tridgell
93d458c5f6 fixed warnings on irix and crash bug on big endian machines
(This used to be commit cc6c263993)
2001-12-20 10:02:30 +00:00
Andrew Tridgell
ec31274163 much better auto-init of valid_table[]. This should just about remove
the need for valid.dat
(This used to be commit 0cfd0a5e54)
2001-12-20 06:18:52 +00:00
Andrew Tridgell
6c0146f74b mark '.' as a valid character
(This used to be commit 85f04fa61d)
2001-12-20 04:12:36 +00:00
Martin Pool
cc0846f967 Add --enable-dmalloc to link against the dmalloc malloc debugger.
It's not as strong as Insure, but it's free, reasonably efficient and
works on every platform.
(This used to be commit e76d27fcdb)
2001-12-20 04:01:44 +00:00
Jeremy Allison
2fe6d5d5a1 Added AC_CHECK_FUNCS(syslog vsyslog).
nsswitch code uses vsyslog without checking for it.
Provide replacement for vsyslog in lib/snprintf if not found by configure.
Jeremy.
(This used to be commit ab2e55cdb3)
2001-12-19 19:18:37 +00:00
Andrew Tridgell
279276c9ca fixed sid_compare_domain()
(This used to be commit c11c27b281)
2001-12-19 08:37:03 +00:00
Martin Pool
085d62b38c Use less memory, but scribble all over it, just in case there's
something wrong with the way it's allocated.
(This used to be commit a7b052d991)
2001-12-19 08:18:07 +00:00
Martin Pool
ec781f8e84 Doc how to reply to messages.
(This used to be commit e2b080587c)
2001-12-19 07:49:25 +00:00
Martin Pool
7110a867a1 Make TALLOC_CTX and talloc_chunk private to talloc.c.
Add a global singly-linked list of all active talloc pools, so that we
can eventually show how much memory is used for different purposes.
This also gives a check that pools are not being doubly freed.

talloc_init_named now handle a NULL name properly (ie does nothing)

Add accessor talloc_pool_name().
(This used to be commit 4c6c03c8c7)
2001-12-19 07:36:32 +00:00
Martin Pool
fc00418dfc Doc
(This used to be commit 7da982e926)
2001-12-19 06:22:23 +00:00
Martin Pool
0b73aad2bf Doc
(This used to be commit 5dc2827b6e)
2001-12-19 06:00:19 +00:00
Martin Pool
d3abe277ef Put PRINTF_ATTRIBUTE on talloc_init_named, talloc_asprintf,
talloc_vasprintf.
(This used to be commit e6be48671d)
2001-12-19 05:02:42 +00:00
Martin Pool
55f6eefe12 Doc.
(This used to be commit 5b6c22a209)
2001-12-19 04:55:58 +00:00
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
dccc1ed3f8 Fixup JF's weird SID return :-).
Jeremy
(This used to be commit 7b8fb8d85c)
2001-12-18 19:44:14 +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
Jean-François Micouleau
a081ad3dae tidy up debug
J.F.
(This used to be commit c44f4e9e33)
2001-12-17 22:57:06 +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
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
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
Martin Pool
5788615e8d Explain why snprintf has to be overridden in this way.
(This used to be commit a4cc69d945)
2001-12-10 04:35:01 +00:00
Tim Potter
ba57d9a136 Typo spotting.
(This used to be commit 62dfda654b)
2001-12-10 04:15:58 +00:00
Andrew Tridgell
e051c2c430 make sid_binstring available without HAVE_ADS
(This used to be commit 4a6d297686)
2001-12-10 00:39:01 +00:00
Andrew Tridgell
e3d171ff55 add smb_xvasprintf() panic wrapper around vasprintf
(This used to be commit fa1e7a62ac)
2001-12-09 23:56:07 +00:00
Jean-François Micouleau
e0066d2dd4 again an intrusive patch:
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the
definition of standard_sub_basic() to cope with that.

- removed the smb.conf: 'domain admin group' and 'domain guest group'
parameters ! We're not playing anymore with the user's group RIDs !

- in get_domain_user_groups(), if the user's gid is a group, put it first
in the group RID list.

I just have to write an HOWTO now ;-)

        J.F.
(This used to be commit fef52c4b96)
2001-12-06 13:09:15 +00:00
Andrew Tridgell
24449a9b0b fixed an off by 1 bug in talloc_asprintf()
(This used to be commit 2b2155beae)
2001-12-05 04:43:53 +00:00
Jean-François Micouleau
922eb763d7 added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free
early.

lib/util_sid.c: added some helper functions to check an SID.

passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass
an RID all the way. If the group doesn't exist on the domain SID,
don't return a faked one as it can collide with a builtin one. Some rpc
structures have been badly designed, they return only rids and force the
client to do subsequent lsa_lookup_sid() on the domain sid and the builtin
sid !

rpc_server/srv_util.c: wrote a new version of get_domain_user_groups().
Only the samr code uses it atm. It uses the group mapping code instead of
a bloody hard coded crap. The netlogon code will use it too, but I have to
do some test first.

	J.F.
(This used to be commit 6c87e96149)
2001-12-04 21:53:47 +00:00
Andrew Tridgell
1838d83e24 moved init_account_policy() to the right place
(This used to be commit e908f304a2)
2001-12-04 06:20:39 +00:00
Andrew Tridgell
aa1e690ba5 const religion in talloc calls
(This used to be commit ea5d285721)
2001-12-04 06:14:42 +00:00
Jeremy Allison
6f0e7b69b7 winbindd friendly user_in_list code. Tested on a 65k user domain.
Jeremy.
(This used to be commit 5215bcca15)
2001-12-04 05:13:04 +00:00
Jeremy Allison
8e99888e7b Moved name_is_local to the correct place. Ooops.
Jeremy.
(This used to be commit 708c0a8d16)
2001-12-04 03:47:44 +00:00
Jeremy Allison
c2e3d8ba01 Tidyup of lib/username. Add name_is_local fn to determine if name is
winbindd. Getting ready for efficiency fix in group lookups.
Jeremy.
(This used to be commit 8d41dfd149)
2001-12-04 02:58:22 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd)
2001-12-03 17:14:23 +00:00
Andrew Tridgell
6f907af4e7 put sid_to_name behind the winbindd backend interface
I spent quite a while trying to work out how to make this call
via ldap and failed. I then found that MS servers seem use rpc
for sid_to_name, and it works even when in native mode, I ended
up just implementing it via rpc
(This used to be commit 789833b44e)
2001-12-03 11:11:14 +00:00
Andrew Tridgell
2285b99cb1 added a basic ADS backend to winbind. More work needed, but at
least basic operations work
(This used to be commit 88241cab98)
2001-12-03 06:04:18 +00:00
Andrew Tridgell
61f68bde82 re-enabled insure backtrace, calling /usr/bin/backtrace
(This used to be commit 21a366afbe)
2001-12-03 00:21:51 +00:00
Andrew Tridgell
de744cb970 The beginnings of alternative backends for winbindd
This just splits off the dispinfo call behind a methods structure.
I'll split off a few more functions soon, then we will be ready for
LDAP replacement methods
(This used to be commit 0216b0fca1)
2001-12-01 12:31:43 +00:00
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a)
2001-11-30 01:04:15 +00:00
Jeremy Allison
ed7feb560b Ensured the %G substitution exactly matches what the man page states.
Jeremy.
(This used to be commit 518084a70d)
2001-11-30 00:28:39 +00:00
Andrew Tridgell
7879a1a811 fixed typo
(This used to be commit 624cb28271)
2001-11-29 06:26:05 +00:00
Andrew Tridgell
5bfc7214af fixed toupper_w() and friends on big-endian
this fixes the core dumps on sparc
(This used to be commit e6004062a5)
2001-11-29 05:20:23 +00:00
Andrew Tridgell
fbcf770865 2nd attempt at fixing lame char tables on big endian machines
(This used to be commit 80841f5763)
2001-11-29 05:03:15 +00:00
Andrew Tridgell
8bd89c72a3 fixed lame char tables on big endian machines
(This used to be commit 568425709d)
2001-11-29 04:58:29 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f117)
2001-11-28 23:54:07 +00:00
Gerald Carter
bd8e916cb5 merge from APPLIANCE_HEAD
(This used to be commit c60aa6c06f)
2001-11-28 21:51:11 +00:00
Andrew Tridgell
241b1b9aa6 turn off the insure xterm hack for now
(This used to be commit 8698f7ef3e)
2001-11-28 04:44:23 +00:00
Andrew Tridgell
ff033d062d allow printing of NULL pointers with internal snprintf
(This used to be commit 91bc14f430)
2001-11-27 13:31:02 +00:00
Andrew Tridgell
3dddd416e8 reverted incorrect patch
(This used to be commit 96224fe2d4)
2001-11-27 05:00:55 +00:00
Tim Potter
585d0efbc6 Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:

	void zero_ip(struct in_adder *ip);
	BOOL is_zero_ip(struct in_addr ip);
(This used to be commit 778f5f77a6)
2001-11-26 03:11:44 +00:00
Andrew Tridgell
ad2974cd05 added "net join" command
this completes the first stage of the smbd ADS support
(This used to be commit 058a5aee90)
2001-11-24 14:16:41 +00:00
Martin Pool
24d03aefe9 More better now.
(This used to be commit a875b3a6e7)
2001-11-23 04:53:56 +00:00
Martin Pool
1a74f88b1f Quieten gcc const warning.
doxyfy.
(This used to be commit 6ddd8e7bf6)
2001-11-23 04:24:26 +00:00
Tim Potter
d2b9acd003 Don't initialise static pointers to NULL.
(This used to be commit 039ea0a0b9)
2001-11-23 01:00:54 +00:00
Tim Potter
79b34d1b11 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Jeremy Allison
d325611842 Merged in JohnR's ping messaging extension.
Jeremy.
(This used to be commit 694372b2c4)
2001-11-20 22:55:46 +00:00
Andrew Tridgell
3db4421eba added strlcpy() and strlcat()
(This used to be commit 233fe71fbb)
2001-11-20 08:50:57 +00:00
Jeremy Allison
580ee96dae We don't actually use the horror that was lib/util_array.c :-).
More deleted code - hurrah !
Jeremy.
(This used to be commit 48a848f748)
2001-11-20 08:14:24 +00:00
Martin Pool
5b1fb34731 Rename xmalloc, xmemdup, xstrdup to smb_$1 to avoid conflicts with the
versions defined by libreadline on SCO (!).
(This used to be commit 32480d7aff)
2001-11-20 06:38:09 +00:00
Martin Pool
94ad8127f5 Fix typo.
(This used to be commit 2c1e68d4ce)
2001-11-19 07:39:35 +00:00
Martin Pool
b99209cce4 Detect libreadline>=4.0, and set HAVE_NEW_LIBREADLINE. At the moment
this is only to get the cast right, but it might help with other parts
of the API that changed later.
(This used to be commit b792c9317a)
2001-11-19 04:18:45 +00:00
Tim Potter
d173bf7049 Added comment about why not to cast the assignment of
rl_attempted_completion_function to rl_completion_function_t.
(This used to be commit dfaafcd622)
2001-11-19 03:44:19 +00:00
Martin Pool
caef2d2884 LIBDIR and LOCKDIR are dynamically configured too.
(This used to be commit 868999ad3c)
2001-11-19 03:35:27 +00:00
Martin Pool
4ea31fb675 Oops, Tim says rl_completion_func_t doesn't exist in all versions of
readline.
(This used to be commit c4b44cfc3f)
2001-11-19 03:34:45 +00:00
Martin Pool
eb2bf006ac Quieten compiler warnings about a callback function prototype that has
changed in recent versions of Readline.
(This used to be commit d0a0d27caa)
2001-11-19 03:11:28 +00:00
Simo Sorce
60906f657c fixed some bugs.
(This used to be commit 37edaeddce)
2001-11-18 16:12:11 +00:00
Jeremy Allison
355124adaf Fixed detection of RedHat headers. Removed another file !
Jeremy.
(This used to be commit d70674312d)
2001-11-16 23:22:49 +00:00
Jeremy Allison
e74c51dfeb I *love* removing code :-). Removed 4 files that weren't being used.
All this stuff was being pulled in due to *one* unneeded call to
fetch a domain SID which smbpasswd already puts in the database...
Jeremy.
(This used to be commit 6bf2505cce)
2001-11-16 18:32:32 +00:00
Jeremy Allison
2c6f0fa510 Tidyups in the merge process.
Jeremy.
(This used to be commit a7b45bfb71)
2001-11-15 21:50:29 +00:00
Tim Potter
06ff349e21 FALSE -> False
(This used to be commit 7c6529c081)
2001-11-15 05:26:22 +00:00
Tim Potter
31b91bfe4e Removed unused variable.
(This used to be commit c8c7da237d)
2001-11-14 01:38:01 +00:00
Jeremy Allison
35da7fae5e Look for DOMAIN\group in group lists and ask winbind.
Jeremy.
(This used to be commit 763fd1c787)
2001-11-13 22:49:50 +00:00
Simo Sorce
25f51f49b1 messed up with patches, this should be the right one,
sorry
(This used to be commit 023514a0b6)
2001-11-12 01:31:43 +00:00
Simo Sorce
8424424471 some bugfix and new functions,
modified mangle.c to use mosltly acnv_????() functions.
this should make also build farm happy
(This used to be commit 8bb5cb27c2)
2001-11-12 00:53:34 +00:00
Simo Sorce
5d152d24a3 fixed, moved and added some functions
note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c
(This used to be commit 64dde3b64f)
2001-11-10 15:21:54 +00:00
Simo Sorce
5a91b271f6 add convert_string_allocate() function
(This used to be commit 8b494b0be3)
2001-11-07 18:14:46 +00:00
Tim Potter
ade911c1c6 Removed totally annoying verbose debug in sid_to_string()
(This used to be commit 4f21ddb873)
2001-11-05 22:57:14 +00:00
Jeremy Allison
59bc781854 Added missing strchr_wa.
Jeremy.
(This used to be commit 16c5d279b9)
2001-11-04 21:10:17 +00:00
Simo Sorce
740d6f5dd6 a big one:
- old mangle code has gone, the new one based on tdb seem resonably ok
   probably the valid.dat table need to be updated to treat wild chars as
   invalid ones (work ok without it)
 - a LOT of new string manipulation function for unicode, they are somewhat
   tested but a review would not be bad
 - some new function I will need for the new unix_convert function I'm writing,
   this will be renamed filename_convert and use only unicode strings.
 - charconv, I attached a comment, if someone wnat to look if I'm right or
   just was hacking to late in the night to make a sane one :)

of course any bug is my responsibility an will be pleased to see patches if
you find any. :-)

Simo.
(This used to be commit ee19f7efb6)
2001-11-04 18:26:53 +00:00
Andrew Tridgell
a896bbcb5a remove {} from default valid char list
(This used to be commit 5dd3c7b3fb)
2001-11-04 18:10:31 +00:00
Jeremy Allison
f8e2baf39e Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
(This used to be commit ee5e7ca547)
2001-11-03 23:34:24 +00:00
Andrew Tridgell
ec09a3e0c7 zero the data, not a pointer to the data ...
(This used to be commit eeaa80aa09)
2001-11-01 03:54:52 +00:00
Andrew Bartlett
6ab678d42b Small 'const' updates ahead of some AuthRewrite merging.
(This used to be commit 3b5e72bda3)
2001-10-31 06:22:19 +00:00
Andrew Bartlett
2fc8e32ad3 Parionia to ensure people don't install libsmb based programs setuid root.
libsmb has not been written to be setuid, with things like LIBSMB_PROG allowing
all sort of fun and games.

Andrew Bartlett
(This used to be commit 0c8e9339d8)
2001-10-31 01:52:34 +00:00
Andrew Bartlett
53ec47a209 Add a bit of 'const' for the data_blob code.
Add a new data_blob_clear_free() function - that zero's out the buffer
when its done.
(This used to be commit b02ed7ee19)
2001-10-29 22:14:17 +00:00
Andrew Bartlett
f9879578c6 More spelling and grammer from Vance. <vance@digital-host.net>
Thanks!

Andrew Bartlett
(This used to be commit f019bed766)
2001-10-29 08:26:45 +00:00