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
Jeremy Allison
7f98456fb3 Add useful VALGRIND #ifdef.
Jeremy.
(This used to be commit 07716f3a23)
2002-07-18 23:28:47 +00:00
Jeremy Allison
4bc4a97e36 Fixed off-by-one in all_string_sub also.
Jeremy.
(This used to be commit 8b0e47fc1f)
2002-07-18 23:22:11 +00:00
Jeremy Allison
8e004fe00d Formatting fixups.
Jeremy.
(This used to be commit 4aa922a1af)
2002-07-18 23:21:45 +00:00
Jeremy Allison
687624fc18 Another bug found by valgrind. Don't AND a src length of -1.
Jeremy.
(This used to be commit a67079882d)
2002-07-18 23:01:44 +00:00
Gerald Carter
06ae9ac5d9 virtual registry framework with initial printing hooks.
(This used to be commit a43d9788fa)
2002-07-18 23:00:24 +00:00
Gerald Carter
2afc1ca42c The previous code would not allow things like string_sub(str, "\\", "/", 0).
It complained about an overflow of 0 bytes.

Jeremy please check since you modified this last.
(This used to be commit a5aad76006)
2002-07-18 22:55:48 +00:00
Andrew Tridgell
c238b5c6a1 don't use C++ comments in C - it doesn't work on many compilers
(This used to be commit cf853314f9)
2002-07-15 09:43:34 +00:00
Andrew Tridgell
369040ac5d fixed a problem with getgroups() where it could include our current
effective gid which could mean that the user gets group 0 in their
group list for acl interpretation

this is a replacement fix for the one richard did in 2.2 (which didn't
cope wiith variable behaviour depending on which nss module was in
use)
(This used to be commit cfc5ca3416)
2002-07-15 03:59:14 +00:00
Simo Sorce
050126e684 addedd new (t)alloc_sub_* functions
they will get a const string and return a (t)alloced epanded one.
also modified passdb/* stuff to use this one.
(This used to be commit d378ac1e2e)
2002-07-14 22:21:40 +00:00
Andrew Bartlett
d7bdcee189 make this a ZERO_STRUCTP for consitancy with the rest of Samba.
(This used to be commit 587a3d91b7)
2002-07-13 09:18:55 +00:00
Andrew Tridgell
a0489b36c1 fixed a stdin bug in XFILE that prevented 'print -' from working
(This used to be commit e66e354421)
2002-07-13 04:28:01 +00:00
Jeremy Allison
e40abc248f The changes in make_sec_desc to make us match W2K broke the marshalling/unmarshalling of
security descriptors. We need to calculate the maximum offset and set the offset
back after reading/writing every field in the SEC_DESC.
This was *nasty* to find....
Jeremy.
(This used to be commit 175d43980e)
2002-07-12 21:09:24 +00:00
Jeremy Allison
25148a148c *Experimental* new large-scaling printer code. Splits printing.tdb into
a separate tdb per printer, but only keeps (currently one) tdb open at
a time (although this is easily changed by changing a #define). Needs
scalability testing with large numbers of printers now....
Jeremy.
(This used to be commit b0909cfa14)
2002-07-11 00:06:29 +00:00
Simo Sorce
fe23e902c6 some support functions to ease the next commit.
(This used to be commit 4be1c882be)
2002-07-09 23:59:46 +00:00
Andrew Tridgell
7f42c53971 the last WINS update broke self registration when we are a WINS
server. The real problem is all the special cases we had for when we
are a wins server as opposed to when we are using a 'real' wins
server.

This patch removes the special cases. We now accept non-broadcast
packets from ourselves and we use ourselves as a wins server when we
are one. This gets rid of the special cases and simplifies things
quite a bit.

It all seems to work, but there are bound to be problems found later.
(This used to be commit 3e843d3015)
2002-07-09 14:17:26 +00:00
Andrew Bartlett
21b9280cf5 Kill off const warnings - add a pile of const to various places.
(This used to be commit 1de04ec473)
2002-07-08 02:14:57 +00:00
Andrew Bartlett
8dc39c1112 (this should have been part of the previous commit)
Add a function to display 'sid types' as strings - makes rpcclient outptut
and DEBUG() logs much eaiser to understand.

Move the enum for SID types to smb.h, becouse is really isn't LSA specific any
more.

Andrew Bartlett
(This used to be commit fc97398611)
2002-07-08 00:40:57 +00:00
Andrew Bartlett
dd118a176a Fix the forword prototype to be a static for this static function.
(This used to be commit bb1aa5e1d2)
2002-07-03 06:48:52 +00:00
Jeremy Allison
82176f4d85 Address the string_sub problem by changing len = 0 to mean "no expand".
Went through and checked all string_subs I could to ensure they're being
used correctly.
Jeremy.
(This used to be commit 17cae0d683)
2002-07-02 06:34:27 +00:00
Andrew Tridgell
9930b0b065 used findstatic.pl to make some variables static and remove some dead
code
(This used to be commit 91ad9041e9)
2002-07-01 09:12:41 +00:00
Andrew Tridgell
3563257247 bias the lookup sorting towards directly reachable IPs
(This used to be commit 514b91827a)
2002-07-01 05:39:32 +00:00
Andrew Tridgell
060b73bd8e don't warn on non-existant files in map_file(), let the caller handle any warning
(This used to be commit 98a119ee58)
2002-06-28 03:19:20 +00:00
Andrew Tridgell
5bc613c362 don't warn on the loading of zero length files. This fixes the
'valid.dat' warning
(This used to be commit 57101ef770)
2002-06-28 02:54:40 +00:00
Andrew Tridgell
551a4cd895 fixed a link problem with global_in_nmbd
(This used to be commit 9a3e323ec2)
2002-06-27 14:54:01 +00:00
Andrew Tridgell
223ddc3f2d The next phase in the WINS rewrite!
We now cope wiith multiple WINS groups and multiple failover servers
for release and refresh as well as registration. We also do the regitrations
in the same fashion as W2K does, where we don't try to register the next
IP in the list for a name until the WINS server has acked the previos IP.
This prevents us flooding the WINS server and also seems to make for much
more reliable multi-homed registration.

I also changed the dead WINS server code to mark pairs of IPs dead,
not individual IPs. The idea is that a WINS server might be dead from
the point of view of one of our interfaces, but not another, so we
need to keep talking to it on one while moving onto a failover WINS
server on the other interface. This copes much better with partial
LAN outages and weird routing tables.
(This used to be commit 313f2c9ff7)
2002-06-27 14:37:17 +00:00
Andrew Tridgell
caeaa0acb0 This commit finally gives us multiple wins server groups. We now
accept an extended syntax for 'wins server' like this:

  wins server = group1:192.168.2.10 group2:192.168.3.99 group1:192.168.0.1

The tags before the IPs don't mean anything, they are just a way of
grouping IPs together. If you use the old syntax (ie. no ':') then
an implicit group name of '*' is used. In general I'd recommend people
use interface names for the group names, but it doesn't matter much.

When we register in nmbd we try to register all our IPs with each group
of WINS servers. We keep trying until all of them are registered with
every group, falling back to the failover WINS servers for each group
as we go.

When we do a WINS lookup we try each of the WINS servers for each group.
If a WINS server for a group gives a negative answer then we give up
on that group and move to the next group. If it times out then
we move to the next failover wins server in the group.

In either case, if a WINS server doesn't respond then we mark it dead
for 10 minutes, to prevent lengthy waits for dead servers.
(This used to be commit e125f06058)
2002-06-26 12:17:11 +00:00
Andrew Tridgell
2842de9d7c made the wins list handling a littler clearer
(This used to be commit d03efabc4d)
2002-06-26 07:27:00 +00:00
Andrew Tridgell
5d61d02c15 mumble ... fix typo ... mumble
(This used to be commit 68be27cfea)
2002-06-26 07:23:35 +00:00
Andrew Tridgell
0dd78fbd7d fixed we_are_multihomed() to cope with dynamic interfaces (ie. don't
cache the result!)
(This used to be commit fc8aa198b1)
2002-06-26 07:23:00 +00:00
Andrew Tridgell
07f35f68e0 - completely rewrote the wins_srv.c code. It is now much simpler, and
gives us a good grounding to properly support multiple wins servers
for different interfaces (which will be coming soon ...)

- fixed our wins registration failover code to actually do failover!
We were not trying to register with a secondary wins server at all
when the primary was down. We now fallback correctly.

- fixed the multi-homed name registration packets so that they work
even in a non-connected network (ie. when one of our interfaces is not
routable from the wins server. Yes, this really happens in the real
world).
(This used to be commit a049360d5b)
2002-06-26 06:44:37 +00:00
Andrew Tridgell
de532c8333 fixed a bug in handling select in the main daemon - this stops the daemon spinning if a signal is received at an inconvenient moment
(This used to be commit d8d7dd523d)
2002-06-25 00:59:14 +00:00
Tim Potter
fdaf087daa Changed level of "bind succeded on port %d" debug to 10.
(This used to be commit de00428ef1)
2002-06-21 01:12:12 +00:00
Tim Potter
df1893d532 Fixed compiler warning.
(This used to be commit c29cef7f34)
2002-06-20 00:45:34 +00:00
Simo Sorce
a60e37096d more debug classess activated
(This used to be commit 897e64d2e0)
2002-06-18 09:20:13 +00:00
Gerald Carter
7b60e23040 compile warngin fixes merged from 2.2
(This used to be commit 29874f4b8f)
2002-06-17 15:33:13 +00:00
Tim Potter
aaf43bbc8f Fixed typo in debug.
(This used to be commit 41f036ab37)
2002-06-17 07:39:43 +00:00
Andrew Bartlett
249368f937 Simplify this code further. Just substitute %H, and let the normal code
paths handle the rest later.

Andrew Bartlett
(This used to be commit 09754ec797)
2002-06-15 13:05:37 +00:00
Andrew Bartlett
3c3814da25 Unsused function since last commit
(This used to be commit 957c865cee)
2002-06-15 12:40:37 +00:00
Andrew Bartlett
ac08646c37 Rework much of the service.c code:
The aim of this execise is to give the 'security>=user' code a straight paper
path.  Security=share will sill call authorise_login(), but otherwise we avoid
that mess.

This allow *much* more accurate error code reporting, beocuse we don't start
pretending that we can use the (nonexistant) password etc.

Also in this patch is code to create the 'homes' share at session setup time
(as we have done in the past - been broken recently) and to record this on
the user's vuser struct for later reference.  The changes here should also
allow for much better use of %H (some more changes to come here).

The service.c changes move a lot of code around, but are not as drastric
as they look...

(Also included is a fix to srv_srvsvc_nt.c where 'total_entries' not
'*total_entries' was compared).

This code is needs testing, but passes my basic tests.

I expect we have lost some functionality, but the stuff I had expected
to loose was already broken before I started.  In particular, we don't 'fall
back' to guest if the user cannot access a share (for security=user).  If you
want this kind of stuff then you really want security=share anyway.

Andrew Bartlett
(This used to be commit 4c0cbcaed9)
2002-06-15 12:38:13 +00:00
Andrew Bartlett
b075458ee7 This patch does 2 things:
It extends the 'server mutex' to conver security=server, becouse the connection
race condition exists here too, and while people *should* use security=domain,
some sites don't....

(This probably should be done in 2.2 as well).

Also, start to actually extract and use the information that the remote
server returns in the info3 struct.

The server mutex code is now in a new file.

Andrew Bartlett
(This used to be commit 9b0dabdf4e)
2002-06-15 11:15:31 +00:00
Andrew Bartlett
9026074f60 Add back sys_getpwnam() and freinds to the system.c interface, but don't
use the silly cache any more.  Also add group functions and fix a few callers.

Andrew Bartlett
(This used to be commit 41d4b94077)
2002-06-15 00:47:52 +00:00
Simo Sorce
e69fba0984 moved lp_list_* functions away from param/loadparm.c, put int lib/util_str.c
and renamed to str_list_* as it is a better name.
Elrond should be satisfied now :)
(This used to be commit 4ae260adb9)
2002-06-14 16:02:59 +00:00
Andrew Bartlett
0d7ac4bc2c Patch from ctrlsoft to make the pluggable passdb subsystem use an lp_list
rather than a string when configuring mulitple backends.

Also adjust some of the users of get_global_sam_sid() to cope with the fact
that it just might not exist (uninitialised, can't access secrets.tdb).

More places need conversion.

Add some const and remove silly casts.

Andrew Bartlett
(This used to be commit c264bf2ec9)
2002-06-14 02:58:03 +00:00
Andrew Bartlett
0886638844 Patch (from ctrlsoft <jelmer@nl.linux.org>) to poptify testparm, and the
modifications required to suppress the const warnings.

Andrew Bartlett
(This used to be commit ec4f1e9e2f)
2002-06-14 02:06:58 +00:00
Andrew Bartlett
baef1358d2 Add const, kill of useless casts and therefore eliminate warnings.
Andrew Bartlett
(This used to be commit 29490f2147)
2002-06-14 00:47:08 +00:00
Jeremy Allison
d179b19179 Ensure we save any older SIGALRM signal handler.
Jeremy.
(This used to be commit aa0a6f5532)
2002-06-13 22:49:13 +00:00
Andrew Bartlett
bad738e653 Latest patch from metze <metze@metzemix.de> to move most of samba across
to using SIDs instead of RIDs.

The new funciton sid_peek_check_rid() takes an 'expected domain sid' argument.

The idea here is to prevent mistakes where the SID is implict, but isn't
the same one that we have in the struct.

Andrew Bartlett
(This used to be commit 04f9a8ff4c)
2002-06-13 14:06:08 +00:00
Simo Sorce
2d64b98807 few fixes from Elrond(elrond@samba-tng.org) and Billy O'Connor(billy@oconnoronline.net)
(This used to be commit 88718883e0)
2002-06-11 22:54:06 +00:00
Andrew Bartlett
959ff024da Remove "sids.h" as it really wasn't being used anywhere, and was exporting
the (now static) global_sam_sid.

The only place it was being used was to return global_sid_NULL to some
uid->sid functions - and I'm not convinced this is correct in any case.

Andrew Bartlett
(This used to be commit e2a76a7fc9)
2002-06-10 12:27:05 +00:00
Andrew Bartlett
b0ffabdcca Globally replace 'global_sam_sid' with get_global_sam_sid(), a self
initialising function.  This patch thanks to the work of
"Stefan (metze) Metzmacher" <metze@metzemix.de>

This is partly to enable the transition to SIDs in the the passdb.

Andrew Bartlett
(This used to be commit 96afea638e)
2002-06-07 14:33:33 +00:00
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