- WHATS NEW IN Samba 3.0.1pre2
- November 7, 2003
+ WHATS NEW IN Samba 3.0.1pre3
+ November 14, 2003
==============================
-This is a preview release of the Samba 3.0.1 code base and is
-provided for testing only. This release is *not* intended for
+This is a preview release of the Samba 3.0.1 code base and is
+provided for testing only. This release is *not* intended for
production servers. Use at your own risk.
-There have been several bug fixes since the 3.0.0 releaser that
-we feel are important to make available to the Samba community
-for wider testings. See the "Changes" section for details on
+There have been several bug fixes since the 3.0.0 releaser that
+we feel are important to make available to the Samba community
+for wider testings. See the "Changes" section for details on
exact updates.
######################################################################
Changes
#######
-Changes since 3.0.1pre1
+Changes since 3.0.1pre2
-----------------------
-Please refer to the CVS log for the SAMBA_3_0 branch for complete
+Please refer to the CVS log for the SAMBA_3_0 branch for complete
details:
+1) Skip over the winbind separator when looking up a user.
+ This fixes the bug that prevented local users from
+ matching an AD user when not running winbindd (bug 698).
+2) Fix a problem with configure on *BSD systems. Make sure
+ we add -liconv etc to LDFLAGS.
+3) Fix core dump bug when security=server and the server goes
+ away.
+4) Correct crash bug due to an empty munged dial string.
+5) Show locked files for -u <user> (bug 590).
+6) Fix bug preventing print jobs from display in the queue
+ monitor used by Windows NT and later clients (bug 660).
+7) Fix several reported problems with point-n-print from
+ Windows 2000/XP clients due to a bug in the EnumPrinterDataEx()
+ reply (bug 338, 527 & 643).
+8) Fix a handful of potential memory leaks in the LDAP code used
+ by ldapsam[_compat] and the LDAP idmap backend.
+
+
+Changes since 3.0.1pre1
+-----------------------
+
1) Match Samba 2.2 behavior; make ACB_NORMAL the default ACB value.
2) Updated Japanese welcome file in SWAT.
3) Fix to nt-time <-> unix-time functions reversible.
24) Change the \n after the password prompt to go to tty instead
of stdout (bug 668).
25) Stop net -P from prompting for machine account password (bug 451).
-26) Change in behavior to Not only change the effective uid but also
+26) Change in behavior to Not only change the effective uid but also
the real uid when becoming unprivileged.
27) Cope with Exchange 5.5 cleartext pop password auth.
28) New files for support of initshutdown pipe. Win2k doesn't
apache header files.
42) COrrect winbindd build problems on HP-UX 11
43) Lowercase netgroups lookups (bug 703).
-44) Use the actual size of the buffer in strftime instead of a made
+44) Use the actual size of the buffer in strftime instead of a made
up value which just happens to be less than sizeof(fstring).
(bug 713).
45) Add ldaplibs to pdbedit link line (bug 651).
lookup fails (bug 698).
56) Add const for lp_set_name_resolve_order() to avoid compiler
warnings (bug 471).
-57) Add support for the %i macro in smb.conf to stand in for the for
+57) Add support for the %i macro in smb.conf to stand in for the for
the local IP address to which a client connected.
58) Allow winbindd to match local accounts to domain SID when
'winbind trusted domains only = yes' (bug 680).
suffix. It's not needed and provides inconsistent functionality
from the tdb backend.
60) Patch to handle munged dial string for Windows 200 TSE.
-61) Correct the "smbldap_open: cannot access when not root error"
+61) Correct the "smbldap_open: cannot access when not root error"
messages when looking up group information (bug 281).
logon_divs int(9),
hours_len int(9),
unknown_5 int(9),
- unknown_6 int(9)
+ unknown_6 int(9),
+ bad_password_count int(9),
+ logon_count(9)
);
-o $@
@BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
+# this adds support for precompiled headers. To use it, install a snapshot
+# of gcc-3.4 and run 'make pch' before you do the main build.
+pch:
+ rm -f $(srcdir)/include/includes.h.gch
+ $(CC) -I. -I$(srcdir) $(FLAGS) -c $(srcdir)/include/includes.h -o $(srcdir)/include/includes.h.gch
+
# These dependencies are only approximately correct: we want to make
# sure Samba's paths are updated if ./configure is re-run. Really it
# would be nice if "make prefix=/opt/samba all" also rebuilt things,
# e.g. SAMBA_VERSION_PRE_RELEASE=1 #
# -> "2.2.9pre1" #
########################################################
-SAMBA_VERSION_PRE_RELEASE=2
+SAMBA_VERSION_PRE_RELEASE=3
########################################################
# For 'rc' releases the version will be #
static void send_server_keepalive(void **private_data_pointer)
{
- struct cli_state **cli = (struct cli_state **)private_data_pointer;
-
/* also send a keepalive to the password server if its still
connected */
- if (cli && *cli && (*cli)->initialised) {
- if (!send_keepalive((*cli)->fd)) {
- DEBUG( 2, ( "password server keepalive failed.\n"));
- cli_shutdown(*cli);
+ if (private_data_pointer) {
+ struct cli_state *cli = (struct cli_state *)(*private_data_pointer);
+ if (cli && cli->initialised) {
+ if (!send_keepalive(cli->fd)) {
+ DEBUG( 2, ( "send_server_keepalive: password server keepalive failed.\n"));
+ cli_shutdown(cli);
+ *private_data_pointer = NULL;
+ }
}
}
}
p = strchr( domuser, *lp_winbind_separator() );
if ( p ) {
+ p += 1;
fstrcpy( mapped_username, p );
map_username( mapped_username );
return Get_Pwnam(mapped_username);
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on compiler debugging information (default=no)],
[if eval "test x$enable_debug = xyes"; then
- echo "DEBUGGING TURNED ON!!!!"
CFLAGS="${CFLAGS} -g"
fi])
default_dos_charset=no
default_display_charset=no
default_unix_charset=no
- echo
# check for default dos charset name
for j in CP850 IBM850 ; do
if test x"$jm_cv_lib_iconv" != x; then
LIBS="$LIBS -l$jm_cv_lib_iconv"
fi
+ dnl Add the flags we need to CPPFLAGS and LDFLAGS
CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
+ LIB_ADD_DIR(LDFLAGS, "$i/lib")
export CPPFLAGS
AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv])
AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,$default_dos_charset,[Default dos charset name])
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "includes.h"
-
/*
This file defines the low-level printing system interfaces used by the
SAMBA printing subsystem.
const char *lang_msg(const char *msgid)
{
TDB_DATA key, data;
- char *p, *q, *msgid_quoted;
+ const char *p;
+ char *q, *msgid_quoted;
int count;
lang_tdb_init(NULL);
i_len=srclen;
o_len=destlen;
- retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len);
+ retval = smb_iconv(descriptor, (char **)&inbuf, &i_len, &outbuf, &o_len);
if(retval==(size_t)-1) {
const char *reason="unknown error";
switch(errno) {
i_len = srclen;
o_len = destlen;
retval = smb_iconv(descriptor,
- &inbuf, &i_len,
+ (char **)&inbuf, &i_len,
&outbuf, &o_len);
if(retval == (size_t)-1) {
const char *reason="unknown error";
for (s = src; *s && !(((unsigned char)s[0]) & 0x80); s++) {
if (*s == c)
- return s;
+ return (char *)s;
}
if (!*s)
break;
}
/* No - we have a match ! */
- return cp;
+ return (char *)cp;
}
} while (cp-- != s);
if (!got_mb)
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
BOOL opt_nocache = False;
#ifndef _WINBINDD_H
#define _WINBINDD_H
-#include "includes.h"
#include "nterr.h"
#include "winbindd_nss.h"
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#ifdef HAVE_ADS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "winbindd.h"
#undef DBGC_CLASS
Copyright (C) Gerald Carter 2001-2003
Copyright (C) Shahms King 2001
Copyright (C) Andrew Bartlett 2002-2003
- Copyright (C) Stefan (metze) Metzmacher 2002
+ Copyright (C) Stefan (metze) Metzmacher 2002-2003
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
char **attrs)
{
int rc;
- LDAPMessage *entry;
+ LDAPMessage *entry = NULL;
LDAPMod **mods = NULL;
char *name, *dn;
BerElement *ptr = NULL;
{
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
- LDAPMessage *result;
- LDAPMessage *entry;
+ LDAPMessage *result = NULL;
+ LDAPMessage *entry = NULL;
int count;
char ** attr_list;
int rc;
static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, const DOM_SID *sid)
{
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
- LDAPMessage *result;
- LDAPMessage *entry;
+ LDAPMessage *result = NULL;
+ LDAPMessage *entry = NULL;
int count;
int rc;
fstring sid_string;
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
const char *sname;
int rc;
- LDAPMessage *result;
+ LDAPMessage *result = NULL;
NTSTATUS ret;
char **attr_list;
fstring objclass;
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
int rc = 0;
char *dn;
- LDAPMessage *result;
- LDAPMessage *entry;
- LDAPMod **mods;
+ LDAPMessage *result = NULL;
+ LDAPMessage *entry = NULL;
+ LDAPMod **mods = NULL;
char **attr_list;
result = pdb_get_backend_private_data(newpwd, my_methods);
element_is_changed)) {
DEBUG(0, ("ldapsam_update_sam_account: init_ldap_from_sam failed!\n"));
SAFE_FREE(dn);
+ if (mods != NULL)
+ ldap_mods_free(mods,True);
return NT_STATUS_UNSUCCESSFUL;
}
if (mods == NULL) {
DEBUG(4,("ldapsam_update_sam_account: mods is empty: nothing to update for user: %s\n",
pdb_get_username(newpwd)));
- ldap_mods_free(mods, True);
SAFE_FREE(dn);
return NT_STATUS_OK;
}
DEBUG(0,("ldapsam_add_sam_account: SID '%s' already in the base, with samba attributes\n",
sid_to_string(sid_string, sid)));
free_attr_list( attr_list );
+ ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
ldap_msgfree(result);
LDAP_OBJ_IDMAP_ENTRY,
LDAP_OBJ_SID_ENTRY);
+ /* free old result before doing a new search */
+ if (result != NULL) {
+ ldap_msgfree(result);
+ result = NULL;
+ }
rc = smbldap_search_suffix(ldap_state->smbldap_state,
filter, attr_list, &result);
element_is_set_or_changed)) {
DEBUG(0, ("ldapsam_add_sam_account: init_ldap_from_sam failed!\n"));
ldap_msgfree(result);
+ if (mods != NULL)
+ ldap_mods_free(mods,True);
return NT_STATUS_UNSUCCESSFUL;
}
ldap_get_option(ldap_state->smbldap_state->ldap_struct, LDAP_OPT_ERROR_STRING,
&ld_error);
DEBUG(0, ("ldapsam_search_one_group: "
- "Problem during the LDAP search: LDAP error: %s (%s)",
+ "Problem during the LDAP search: LDAP error: %s (%s)\n",
ld_error?ld_error:"(unknown)", ldap_err2string(rc)));
- DEBUG(3, ("ldapsam_search_one_group: Query was: %s, %s\n",
+ DEBUGADD(3, ("ldapsam_search_one_group: Query was: %s, %s\n",
lp_ldap_group_suffix(), filter));
SAFE_FREE(ld_error);
}
{
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)methods->private_data;
- LDAPMessage *result;
- LDAPMessage *entry;
+ LDAPMessage *result = NULL;
+ LDAPMessage *entry = NULL;
int count;
if (ldapsam_search_one_group(ldap_state, filter, &result)
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)methods->private_data;
int rc;
- char *dn;
- LDAPMessage *result;
- LDAPMessage *entry;
- LDAPMod **mods;
+ char *dn = NULL;
+ LDAPMessage *result = NULL;
+ LDAPMessage *entry = NULL;
+ LDAPMod **mods = NULL;
rc = ldapsam_search_one_group_by_gid(ldap_state, map->gid, &result);
result, &mods, map)) {
DEBUG(0, ("ldapsam_update_group_mapping_entry: init_ldap_from_group failed\n"));
ldap_msgfree(result);
+ if (mods != NULL)
+ ldap_mods_free(mods,True);
return NT_STATUS_UNSUCCESSFUL;
}
{
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)methods->private_data;
pstring sidstring, filter;
- LDAPMessage *result;
+ LDAPMessage *result = NULL;
int rc;
NTSTATUS ret;
char **attr_list;
smbldap_free_struct(&(*ldap_state)->smbldap_state);
+ if ((*ldap_state)->result != NULL) {
+ ldap_msgfree((*ldap_state)->result);
+ (*ldap_state)->result = NULL;
+ }
+
*ldap_state = NULL;
/* No need to free any further, as it is talloc()ed */
alg_rid_base_string)) {
alg_rid_base = (uint32)atol(alg_rid_base_string);
if (alg_rid_base != algorithmic_rid_base()) {
- DEBUG(0, ("pdb_init_ldapsam: The value of 'algorithmic RID base' has changed since the LDAP\n\
-database was initialised. Aborting. \n"));
+ DEBUG(0, ("The value of 'algorithmic RID base' has changed since the LDAP\n"
+ "database was initialised. Aborting. \n"));
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "printing.h"
static TALLOC_CTX *send_ctx;
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "printing.h"
#ifdef HAVE_CUPS
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "printing.h"
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "printing.h"
/* Current printer interface */
size_t i;
uint qcount;
- if (max_reported_jobs < pts->qcount)
+ if (max_reported_jobs && (max_reported_jobs < pts->qcount))
pts->qcount = max_reported_jobs;
qcount = pts->qcount;
len = 0;
for( i = 0; i < qcount; i++) {
uint32 qjob, qsize, qpage_count, qstatus, qpriority, qtime;
- len += tdb_unpack(data.dptr + 4 + len, data.dsize - len, NULL, "ddddddff",
+ len += tdb_unpack(data.dptr + 4 + len, data.dsize - len, "ddddddff",
&qjob,
&qsize,
&qpage_count,
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "includes.h"
#include "printing.h"
static struct tdb_print_db *print_db_head;
str->uni_max_len = str->uni_str_len;
str->offset = 0;
str->buffer = (uint16 *) memdup(blob->data, blob->length);
- if (!str->buffer) {
+ if ((str->buffer == NULL) && (blob->length > 0)) {
smb_panic("init_unistr2_from_datablob: malloc fail\n");
}
}
if (!prs_unistr("valuename", ps, depth, &ctr->values[i].valuename))
return False;
- if (UNMARSHALLING(ps) && ctr->values[i].data_len) {
- ctr->values[i].data = (uint8 *)prs_alloc_mem(
- ps, ctr->values[i].data_len);
- if (!ctr->values[i].data)
- return False;
+ if ( ctr->values[i].data_len ) {
+ if ( UNMARSHALLING(ps) ) {
+ ctr->values[i].data = (uint8 *)prs_alloc_mem(
+ ps, ctr->values[i].data_len);
+ if (!ctr->values[i].data)
+ return False;
+ }
if (!prs_uint8s(False, "data", ps, depth, ctr->values[i].data, ctr->values[i].data_len))
return False;
}
next_rid = *rid+1;
if (next_rid >= alg_rid_base) {
+ ldap_msgfree(domain_result);
return NT_STATUS_UNSUCCESSFUL;
}
pstring id_str, new_id_str;
LDAPMod **mods = NULL;
const char *type;
- char *dn;
+ char *dn = NULL;
char **attr_list;
pstring filter;
uid_t luid, huid;
smbldap_set_mod( &mods, LDAP_MOD_DELETE, type, id_str );
smbldap_set_mod( &mods, LDAP_MOD_ADD, type, new_id_str );
-
+
+ if (mods == NULL) {
+ DEBUG(0,("ldap_allocate_id: smbldap_set_mod() failed.\n"));
+ goto out;
+ }
+
rc = smbldap_modify(ldap_state.smbldap_state, dn, mods);
- SAFE_FREE(dn);
ldap_mods_free( mods, True );
-
if (rc != LDAP_SUCCESS) {
DEBUG(0,("ldap_allocate_id: Failed to allocate new %s. ldap_modify() failed.\n",
type));
ret = NT_STATUS_OK;
out:
+ SAFE_FREE(dn);
+ if (result != NULL)
+ ldap_msgfree(result);
+
return ret;
}
count = ldap_count_entries(ldap_state.smbldap_state->ldap_struct, result);
+ ldap_msgfree(result);
+
if ( count > 1 ) {
DEBUG(0,("ldap_idmap_init: multiple entries returned from %s (base == %s)\n",
filter, lp_ldap_idmap_suffix() ));
done
-# Install html documentation
+# Install html documentation (if html documentation tree is here)
-for f in $SRCDIR../docs/htmldocs/*.html; do
- FNAME=$SWATDIR/help/`basename $f`
- echo $FNAME
- cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
- chmod 0644 $FNAME
-done
+if [ -d $SRCDIR../docs/htmldocs/ ]; then
+
+ for f in $SRCDIR../docs/htmldocs/*.html; do
+ FNAME=$SWATDIR/help/`basename $f`
+ echo $FNAME
+ cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
+ chmod 0644 $FNAME
+ done
+fi
# Install Using Samba book (but only if it is there)
#include "includes.h"
-static pstring Ucrit_username = ""; /* added by OH */
-static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */
-static int Ucrit_MaxPid=0; /* added by OH */
-static unsigned int Ucrit_IsActive = 0; /* added by OH */
+#define SMB_MAXPIDS 2048
+static pstring Ucrit_username = ""; /* added by OH */
+static pid_t Ucrit_pid[SMB_MAXPIDS]; /* Ugly !!! */ /* added by OH */
+static int Ucrit_MaxPid=0; /* added by OH */
+static unsigned int Ucrit_IsActive = 0; /* added by OH */
+
static int verbose, brief;
static int shares_only = 0; /* Added by RJS */
static int locks_only = 0; /* Added by RJS */
static void Ucrit_addUsername(const char *username)
{
pstrcpy(Ucrit_username, username);
- if(strlen(Ucrit_username) > 0)
+
+ if ( strlen(Ucrit_username) > 0 )
Ucrit_IsActive = 1;
}
static unsigned int Ucrit_checkUsername(const char *username)
{
- if ( !Ucrit_IsActive) return 1;
- if (strcmp(Ucrit_username,username) ==0) return 1;
+ if ( !Ucrit_IsActive )
+ return 1;
+
+ if ( strcmp(Ucrit_username,username) == 0 )
+ return 1;
+
return 0;
}
static unsigned int Ucrit_checkPid(pid_t pid)
{
int i;
- if ( !Ucrit_IsActive) return 1;
- for (i=0;i<Ucrit_MaxPid;i++)
- if( pid == Ucrit_pid[i] ) return 1;
+
+ if ( !Ucrit_IsActive )
+ return 1;
+
+ for (i=0;i<Ucrit_MaxPid;i++) {
+ if( pid == Ucrit_pid[i] )
+ return 1;
+ }
+
return 0;
}
+static BOOL Ucrit_addPid( pid_t pid )
+{
+ if ( !Ucrit_IsActive )
+ return True;
+
+ if ( Ucrit_MaxPid >= SMB_MAXPIDS ) {
+ d_printf("ERROR: More than %d pids for user %s!\n",
+ SMB_MAXPIDS, Ucrit_username);
+
+ return False;
+ }
+
+ Ucrit_pid[Ucrit_MaxPid++] = pid;
+
+ return True;
+}
static void print_share_mode(share_mode_entry *e, char *fname)
{
return 0;
}
+ Ucrit_addPid( sessionid.pid );
+
d_printf("%5d %-12s %-12s %-12s (%s)\n",
(int)sessionid.pid, uidtoname(sessionid.uid), gidtoname(sessionid.gid),
sessionid.remote_machine, sessionid.hostname);