1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

185 Commits

Author SHA1 Message Date
Gerald Carter
e0db859a31 call initgroups before becomming the user; patch from Fabio Cecchi -
Tim Potter
17efb306aa Merge from 3.0:
>Moving towards better i18n support in SWAT.  This commit contains a
>bunch of updates to bug 413 from Monyo:
>
>1) pick up proper strings to call msg strings for example to add
>  strings in wizard menu in web/swat.c, web/statuspage.c and
>  param/loadparm.c.
>
>2) define N_() macro in include/intl.h to pick up some strings
>  in param/loadparm.c
>
>3) quote all name and value tag with '"'
>  For example in swat.c:720 the "Edit Parameter Values" string is
>  displayd only as "Edit" because value tag is not quoted like:
>  value=Edit Parameter Values
>  These tags should be quoted though it sometimes works well
>  without quotation.
>
>4) modify the msg strings not to contain HTML tags or other
>  non-message strings. For example
>  dprintf(_("test\n")); is modified to dprintf("%s\n", _("test"));
-
Tim Potter
1ab70b41a9 Merge from 3.0:
>More bug #413.  Fix bad html table row termination in SWAT wizard code found by
>Monyo.  Also remove debugging d_printf() which snuck in the last commit.

>Change title of SWAT globals page from 'Global Variables' to 'Global
>Parameters' to be more consistent with the other pages.
-
Gerald Carter
c17a7dc9a1 sync 3.0 into HEAD for the last time -
Simo Sorce
3101c236b8 port latest changes from SAMBA_3_0 tree -
Gerald Carter
adb98e7b7c trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
-
Jelmer Vernooij
d31509fe88 Reverse previous patch from Stefan and me after comments by Andrew Bartlett. -
Jelmer Vernooij
367a5cad1e Patch from metze and me that adds dummy smb_register_*() functions -
Jeremy Allison
4fe84f6173 Make fchown, fchmod conditional for systems that don't have them.
Jeremy.
-
John Terpstra
308e384862 Added patch from Stephen Roylance. -
John Terpstra
2172e558fb Added Stephen Roylance's patch to add buttons to start/stop/restart all three
daemons.
-
Jeremy Allison
214b217b27 Fixup swat warning.
Fix winbindd dual mode in the same was as in APP_HEAD. "Ken Cross" <kcross@nssolutions.com>
noticed the problem.
Jeremy.
-
Jelmer Vernooij
2ddfed298d Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes -
Jelmer Vernooij
44e9bf88cc Use True, not TRUE and False, not FALSE -
Jelmer Vernooij
3cd1650d38 Make swat use popt -
Jelmer Vernooij
3780d12731 Fix HTTP error codes (patch by Vance Lankhaar) -
Martin Pool
9af0717315 Doxygen janitor -
Martin Pool
d2fd52c1b5 Fix comment typo -
Jim McDonough
8c69212eeb base64_decode() with heimdal libs, so I've renamed it base64_decode_inplace(). -
Andrew Bartlett
98a4ebf55c Prompted by RedHat bugzilla bug #77999, convert the user's username and
password from 'display' to 'unix' before we check them.

Andrew Bartlett
-
Gerald Carter
3e9701f34c connect to the actual netbios name in smb.conf and not LOCALHOST -
Andrew Bartlett
fe50ca8f54 Updates to the NTLMSSP code again - moving the base64 decode fuctionality out
of the SWAT code, and adding a base64 encoder.

The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for
use with Squid.  Unfortunetly the squid side doesn't quite support what we need
yet.

Changes to winbind to get us the info we need, and a couple of consequential
changes/cleanups in the rest of the code.

Andrew Bartlett
-
Gerald Carter
4c48c475a2 patch to include support for daemontools from Michael Handler -
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Tim Potter
2a9d183cf6 Remove FILE_MACRO as __FILE__ is ANSI C. -
Herb Lewis
243763d6eb use FILE_MACRO instead of __FILE__
use FUNCTION_MACRO instead of __FUNCTION_
-
Andrew Bartlett
82dbf83887 Add ntlm_auth, a new program to provide a stable interface to winbind's
authentication code.

In particular, ntlm_auth is designed to replace the winbind authentication
'helpers' currently supplied by Squid.  I have added support for the current
plaintext password protocol used by Squid, and will add the real guts (NTLMSSP
support) shortly.

I'll merge this into 3.0 when I've got the interface more stable (error message
format etc) and got the important NTLMSSP support added.

Also move SWAT's URL decoding code into util_str.c, for use in both utilities.

Andrew Bartlett
-
Jeremy Allison
71768c488e Use memmove when copies can overlap. Spotted by SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
Jeremy.
-
Richard Sharpe
0c8e8a1620 Fix John's little typo ... -
John Terpstra
f896232cff Fix ability to locate if we are a WINS client. -
Andrew Bartlett
f428ee98d8 Another patch from Steve Langasek <vorlon@netexpress.net>, again from the
Debian patchset.

The idea is to still allow DNS domains to be specified in 'hosts allow' and
'hosts deny' without making the admin set 'hostname lookups' in their smb.conf.
His concern is about upgrades.

This has been designed not to change the value of %M.

Andrew Bartlett
-
John Terpstra
89842d94bb Committing changes before I lose them. Work still in progress. -
Simo Sorce
7532e82896 fix log level, set a default, and also copy the value set in smb.conf into parm_struct.ptr
this one also fixes log level not shown in swat
fix swat help system
-
Simo Sorce
61294d74b2 people should be happier now.
changed strtof with sscanf to make things working on all platforms.
changed auto-made bubble sort for more efficient and clean qsort()
-
Simo Sorce
69765e4faa found nasty bug in intl/lang_tdb.c tdb structure was not tested to not be null before close
this one fixes swat not working with browsers that set more then one language.

along the way implemented language priority in web/neg_lang.c with bubble sort

also changet str_list_make to be able to use a different separator string

Simo.
-
Simo Sorce
e0988e9186 as per user request added windbind start/stop/restart in swat
almost working, seem it does not yet properly detect if windbind is running or not in all situations testing is welcome.
-
Andrew Tridgell
e125f06058 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.
-
Andrew Bartlett
edb41dad2d Break up samba's object dependencies, and its prototype includes.
Now smbclient, net, and swat use their own proto files - now the global
proto.h

The change to libads/kerberos.c was to break up the dependency on secrets.c -
we want to be able to write an ADS client that doesn't need local secrets.

I have other breakups in the works - I will remove the dependency of
rpc_parse on passdb (and therefore secrets.c) shortly.

(NOTE:  This patch does *not* break up includes.h, or other such forbidden
actions).

Andrew Bartlett
-
Simo Sorce
4ae260adb9 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 :)
-
Richard Sharpe
c986a19cde Changes to allow head to translate NMB flags ... -
Martin Pool
098905bea2 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
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Andrew Bartlett
f8208458b3 getpwnam -> getpwnam_alloc -
Andrew Bartlett
1d86c7f942 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
-
Martin Pool
79ec88f0da Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
-
Martin Pool
91e07a7fdc Fix const warning. Doxyfy comment. -
Andrew Tridgell
5296b20ad8 the next step in the intl changeover. This should get us compiling agian,
and also completes the switch to lang_tdb.c. SWAT should now work
with a po file in the lib/ directory

also removed useless SYSLOG defines in many files
-
Andrew Tridgell
ab7f67677a first step in converting the head branch to use lang_tdb.c instead
of gettext for internationalisation support. There is more to do
-
Gerald Carter
831530d93d merge from 2.2 -
Jeremy Allison
611bf806d5 Fixup passdb stuff to add new nisplus and ldap backends.
Jeremy.
-