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

230 Commits

Author SHA1 Message Date
Stefan Metzmacher
c3a9f30e2a r14618: add --no-process-group to all server programms
to make the following possible:

timelimit 20000 bin/nmbd -F -S --no-process-group
timelimit 20000 bin/smbd -F -S --no-process-group

this is needed to 'make test' working without losing child processes

metze
2007-10-10 11:15:39 -05:00
James Peach
950ed28f9f r14255: Revert r14204 which was horribly broken. 2007-10-10 11:15:21 -05:00
James Peach
23328fe6fc r14204: Remove the basically unused P_GSTRING and P_UGSTRING
parameter types.
2007-10-10 11:15:16 -05:00
Jeremy Allison
1d710d06a2 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
2007-10-10 11:10:59 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Gerald Carter
1b955bbf59 r13383: pulling in swat-welcome patch from SuSE packaging 2007-10-10 11:09:57 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Jeremy Allison
815340e1a4 r13262: Arrgggg. Fix smbstatus and swat status to ignore
bloody placeholder share mode entries (I hate
these - I've had to add this filter code now to too
many places :-).
Jeremy.
2007-10-10 11:06:20 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
2007-10-10 11:06:18 -05:00
Jeremy Allison
417ef5bffa r13140: Fix swat - make sure it can list running services (ensure loopback_ip)
is defined. Jerry - this needs to be in 3.0.21b.
Jeremy.
2007-10-10 11:06:15 -05:00
Jeremy Allison
c2752347eb r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with
ASCII equivalents (mapping into _w variants).
Jeremy.
2007-10-10 11:05:58 -05:00
Gerald Carter
85ea7afd8b r12393: cleaning up swat bugs. *no one* tests swat it seems. This has been broken since r10656 2007-10-10 11:05:54 -05:00
Jeremy Allison
9d93af713f r12203: Add the share path into the sharemode db. This involves
revving the minor version number for libsmbsharemodes (we
now have a new _ex interface that takes the share path
as well as the filename). Needed for #3303. Some code written
by SATOH Fumiyasu <fumiya@samba.gr.jp> included in the changes
to locking/locking.c. The smbstatus output is a bit of a mess
and needs overhauling...
Jeremy.
2007-10-10 11:05:49 -05:00
Jeremy Allison
414303bc02 r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
2007-10-10 11:05:19 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Gerald Carter
9c78f3b0d6 r9790: remove 'set but not used' variables (reported by Jason Mader) 2007-10-10 11:03:26 -05:00
Gerald Carter
4d50671602 r9266: fix help links in swat editor after doc layout changes 2007-10-10 11:00:29 -05:00
Jeremy Allison
c7fe18761e r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
2007-10-10 10:58:18 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Deryck Hodge
3732705605 r6959: Meant to fix this before commiting, just to be consistent.
deryck
2007-10-10 10:56:59 -05:00
Deryck Hodge
cd12641383 r6958: Properly display quotes in SWAT. Thanks to Jay
Fenlason <fenlason@redhat.com> for spotting this issue.

deryck
2007-10-10 10:56:58 -05:00
Deryck Hodge
b9b18a09ea r6395: Fix for Bug 2137, from Jay Fenlason <fenlason@redhat.com>
Encode quotes for display in HTML.

deryck
2007-10-10 10:56:40 -05:00
Volker Lendecke
1ce9a0159d r6281: Fix the build for FreeBSD 4 -- no winbind 2007-10-10 10:56:34 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Deryck Hodge
c9cacd553f r5179: Add -P (password-menu-only) option to swat. Admins can allow users
to use swat to change their password without allowing them to see
the "View" and "Status" buttons.

deryck
2007-10-10 10:55:32 -05:00
Jeremy Allison
80e7c6c312 r4577: Fix from William Jojo <jojowil@hvcc.edu> for AIX 5.3 compile.
Jeremy.
2007-10-10 10:53:47 -05:00
Jeremy Allison
8de0488809 r4369: Patch for bug #2190 (SWAT displaying parameters in UNIX charset)
not utf8. Fixed by Shiro Yamada <shiro@miraclelinux.com>.
Jeremy.
2007-10-10 10:53:46 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Tim Potter
7f161702fa r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
2007-10-10 10:52:55 -05:00
Günther Deschner
6d9f77c2bb r2771: Second (and last) part of Swat-i18n-Patch from Björn Jacke
<bjacke@sernet.de>

"Do not use display charset for swat output. In HTML we do not care
about the "locale charmap" because HTML code is UTF-8 only now.
Additionally take care that we convert files from statuspage from unix
charset to UTF-8. Thus we have correct HTML output under all
circumstances. We now also convert the share names correctly from unix
encoding to web encoding and vice vera.  "

Guenther
2007-10-10 10:52:52 -05:00
Gerald Carter
980740da78 r1833: patch from James Peach to get swat to look for index.html by default when given a trailing directory/ 2007-10-10 10:52:21 -05:00
Gerald Carter
08fc16d7e6 r492: BUG 483: patch from Michel Gravey <michel.gravey@optogone.com> to fix password hash creation in SWAT 2007-10-10 10:51:26 -05:00
Gerald Carter
a7e2730ec4 r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
2007-10-10 10:51:05 -05:00
Jeremy Allison
7b96765c23 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
d77d38560d BUG 488: fix the 'show client in col 1' button and corrctely enumerate active connections 0001-01-01 00:00:00 +00:00
Tim Potter
2285ec9737 printf -> d_printf
Bugzilla #1066.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
fcdc5efb1e Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
955436a6f6 This should be the correct fix for the lack of a prototype for
remote_password_change().

Sorry for the original bug.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
5a32f9568f fix problems with proto.h 0001-01-01 00:00:00 +00:00
Gerald Carter
b60f6ec30d remerge andrew's cracklib patch from HEAD and fix a compile warnings 0001-01-01 00:00:00 +00:00
Andrew Bartlett
8d54f5fe0c Fix bug 916 - do not perform a + -> space substitution for squid URL encoded
strings, only form input in SWAT.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
879d0f15ea include WWW-Authenticate field in 401 response for bad auth attempt; bug 629 0001-01-01 00:00:00 +00:00
Gerald Carter
04e37283f2 fix winbind ping call so that SWAT correctly determines if winbindd is running; bug 398 0001-01-01 00:00:00 +00:00
Gerald Carter
5bf91c79d6 Ensure that items in a list of strings containing whitespace
are written out surrounded by single quotes.  This means that
both double and single quotes are now used to surround
strings in smb.conf.  This is a slight change from the previous
behavior but needed or else things like

    printer admin = +ntadmin, 'VALE\Domain, Admin'

get written to smb.conf by SWAT.
0001-01-01 00:00:00 +00:00
Volker Lendecke
d7162122ea Simple rename of get_socket_addr to get_peer_addr and get_socket_name to
get_peer_name. This is to get closer to the getsockname/getpeername system
functions.

Next step will be the %i macro for the local IP address. I still want to play
%L-games in times of port 445.

Volker
0001-01-01 00:00:00 +00:00
Jeremy Allison
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
5a8dbccd66 call initgroups before becomming the user; patch from Fabio Cecchi 0001-01-01 00:00:00 +00:00
Tim Potter
351d16956d 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"));
0001-01-01 00:00:00 +00:00
Tim Potter
0192f41003 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.
0001-01-01 00:00:00 +00:00