summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-09-24 13:06:21 +0000
committerGerald Carter <jerry@samba.org>2004-09-24 13:06:21 +0000
commitd82a5ff54ebc9e127f06cd1228d3f952728e23c9 (patch)
tree3f837b01c8ec5684e1bf96eac48a7572cbc58db3
parent3cf617a8c779ef153080bd00d20bfaa349603096 (diff)
downloadsamba-d82a5ff54ebc9e127f06cd1228d3f952728e23c9.tar.gz
r2598: syncing up files for 3.0.8pre1
-rw-r--r--WHATSNEW.txt264
-rw-r--r--examples/auth/Makefile4
-rw-r--r--examples/pdb/Makefile4
-rwxr-xr-xsource/autogen.sh4
-rw-r--r--source/include/nterr.h3
-rw-r--r--source/libads/ldap_printer.c2
-rw-r--r--source/libsmb/errormap.c3
-rw-r--r--source/libsmb/nterr.c16
-rw-r--r--source/nsswitch/winbindd_user.c2
-rw-r--r--source/nsswitch/winbindd_util.c1
-rw-r--r--source/printing/printing.c4
-rw-r--r--source/rpc_server/srv_spoolss_nt.c24
-rw-r--r--source/smbd/reply.c14
13 files changed, 285 insertions, 60 deletions
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 5223fa2513b..1f3f2d729e4 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,233 @@
+ =================================
+ Release Notes for Samba 3.0.8pre1
+ Sept 24, 2004
+ =================================
+
+This is a preview release of the Samba 3.0.8 code base.
+It is *not* intended for production use but rather is
+provided to allow people to test the bug fixes and new
+features in the upcoming 3.0.8 release. Use at your own
+risk.
+
+Common bugs fixed in 3.0.8pre1 include:
+
+ o Compile fixes for HP-UX
+ o Fixes for the printer publishing code used when
+ joined to an AD domain.
+ o Incompatibilities with file system quotas.
+
+New features included in the 3.0.8pre1 release are:
+
+ o New migration functionality added the the net tool
+ for files/directories, printers, and shares.
+
+
+Change in Winbindd Behavior
+---------------------------
+
+All usernames returned by winbindd are now converted to lower
+case for better consistency. This means any winbind installation
+relying on the winbind username will need to rename existing
+directories and/or files based on the username (%u and %U) to lower
+case (e.g. mv $name `echo $name | tr '[A-Z]' '[a-z]'`). This may
+include mail spool files, home directories, valid user lines in
+smb.conf, etc....
+
+
+
+######################################################################
+Changes
+#######
+
+Changes since 3.0.7
+-------------------
+
+commits
+-------
+o Jeremy Allison <jra@samba.org>
+ * Ensure extended security bit is on only if we negotiated
+ extended security.
+ * Simplify statcache to use an in-memory tdb.
+ * If you're selecting a hash algorithm for tdb, you need
+ to do it at open time.
+ * Removed old dir caching code - not being used now we
+ have the statcache anyway.
+ * Simplify the mangle hash code to use an in-memory tdb.
+ * Merge iconv changes from Samba 4 branch.
+ * Fix parsing of names ending in dot and a few other error
+ returns.
+ * BUG 1667: Smbpasswd file could be left locked on some
+ error exits.
+ * Fixes for smbclient tar functionality.
+ * BUG 1743: Fix logic bug the deferred open code.
+ * Don't try to set security descriptors on shares where
+ this has been turned off.
+ * Return correct error codes on old SEARCH call.
+
+
+o Andrew Bartlett <abartlet@samba.org>
+ * Avoid changing the machine account password in the passdb
+ backend, when it has 'already been changed'. This occurs
+ in situations where the secure channel between the workstation
+ and the DC breaks down, such as occurred in the MS04-11
+ security patch.
+ * Fix utility name in error message in ntlm_auth.
+
+
+o Igor Belyi <sambauser@katehok.ac93.org>
+ * Ensure pdb user is deleted first before deleting UNIX
+ user (LDAP backend needs this ordering).
+
+
+o Cornelio Bondad Jr <Corny.Bondad@hp.com>
+ * Fix core dump in 'net rpc vampire'.
+
+
+o Vince Brimhall <vbrimhall@novell.com>
+ * Make ldapsam_compat robust against NULL attributes.
+
+
+o Gerald Carter <jerry@samba.org>
+ * Don't limit the number of groups returned by winbindd_getgroups()
+ by NGROUPS_MAX.
+
+
+o Sean Chandler <sean.chandler@verizon.net>
+ * Fix memlieak in cliconnect.c.
+
+
+o Guenther Deschner <gd@samba.org>
+ * add IA64 to the architecture table of printer-drivers.
+ * Add file/share/printer migration functionality to
+ the net command.
+ * Show correct help for net groupmap commands.
+ * Fix deadlock loop in winbind's required_membership_sid
+ verification.
+ * Bring the same level of "required_membership"-functionality
+ that ntlm_auth uses, to pam_winbindd as well.
+ * Prevent "net lookup kdc" from seg-faulting when
+ using our own implementation of krb5_lookup_kdc with
+ heimdal.
+ * Adding getprinter level 7 to rpcclient.
+ * Support migrating printers|shares|files from Server A
+ to Server B while running the net-command on client C.
+ * Fixed krb5_krbhost_get_addrinfo()-parameters and make
+ failure of this call non-critical (Thanks to Love @ Heimdal
+ for the explanation and patch).
+
+
+o Arthur van Dongen <avdongen@xs4all.nl>
+ * Fix typos in pam_winbind log messages and SuSE
+ packaging files.
+
+
+o Rob Foehl <rwf@loonybin.net>
+ * Typo fixes for log messages in printer publishing code.
+ * Fix memory leak in printer publishing code.
+ * Ensure print_backend_init() only gets called once.
+ * Have smbd check the published status of all printers
+ at startup.
+ * Cleanup up the XXX_a_printer() API for consistency.
+ * Refactored the printer publishing code and include better
+ error handling.
+
+
+o Chris Hertel <crh@samba.org>
+ * Fix logic bug in splay tree data structure when finding
+ a leaf node.
+
+
+o Guenter Kukkukk <guenter.kukkukk@kukkukk.com>
+ * BUG 1590: Fix for talking to OS/2 clients (max_mux ignored).
+
+
+o Volker Lendecke <vl@samba.org>
+ * Robustnss fix for winbindd when sending multiple requests
+ at a high rate for a slow operation.
+ * Solve the problem of user sids ending up with gid's
+ and vice versa.
+ * Use sys_fork instead of fork for the dual daemon so that
+ we get the correct debug pid in the logfiles.
+ * Based on patch from jmcd, implement special lists for the LDAP
+ user attributes to delete.
+ * Fix creation of aliases via usrmgr. Winbind was too strict
+ checking the type of sids.
+ * Lowercase all usernames returned by winbind.
+
+
+o Jim McDonough <jmcd@us.ibm.com>
+ * Allow 'net ads lookup' to rely on command line arguments
+ if contacting an ADS server fails; utilize cldap for lookups.
+ * Fixup formatting errors in TDB_LOG calls; add printf attribute
+ support to tdb log functions.
+
+
+o Lars Mueller <lmuelle@suse.de>
+ * Small fixes for autogen.sh to deal with version detection
+ of autoconf and autoheader; fixes for examples using
+ libtool to adhere to stricter syntax of newer version.
+
+
+o Stefan Metzmacher <metze@samba.org>
+ * Fix crash in smbcquotas and smbcacls caused by setup_logging().
+ * Fix client quota support.
+ * Fix opening of system quota file.
+
+
+o Henrik Nordstrom <hno@squid-cache.org>
+ * Allow winbindd to return the correct number of groups
+ when the groups array must be enlarged.
+
+
+o Tim Potter <tpot@samba.org>
+ * BUG 1360: (correct fix) Use -Wl when passing flags to
+ the linker.
+ * HP-UX compile fixes (from JBravo on #samba-technical).
+ * BUG 1731: More HP-UX compiles fixes.
+ * BUG 1778: Include yp_prot.h before ypclnt.h as AIX 5.2
+ spits the dummy otherwise.
+
+
+o Richard Renard <rrenard@idealx.com>
+ * Fix usermgr.exe and trust relationships.
+
+
+o Paul Szabo <psz@maths.usyd.edu.au>
+ * Fix to make find_workgroup use the same
+ truncation as create_workgroup.
+
+
+o Simo Sorce <idra@samba.org>
+ * Added check password script code in examples/auth/crackcheck/
+
+
+o Andrew Tridgell <tridge@samba.org>
+ * Remove lp_use_mmap() from map_file() since the latter
+ is for read only and does not require coherence.
+ * Ensure that the uuid pack/unpack routines do not go past
+ the end of the structure.
+ * Converted Samba 3 tree to use the new utf-16 aware iconv
+ code.
+ * Changed iconv to recognise UCS-2LE and UTF-16LE as synonyms.
+ * Ensure configure only uses '=' instead of the bashism '=='.
+
+
+o Jelmer Vernooij <jelmer@samba.org>
+ * Convert internal data to UTF-8 before calling libxml2.
+
+
+o Josef Zlomek
+ * BUG 1541: Fix recursive ls in smbclient.
+
+
+o Igor Zhbanov <bsg@uniyar.ac.ru>
+ * BUG 1797: Prevent winbind and nmbd from ignoring the "-l"
+ option.
+
+
+Changes for older versions follow below:
+
+ --------------------------------------------------
=============================
Release Notes for Samba 3.0.7
Sept 13, 2004
@@ -5,34 +235,34 @@
This is the latest stable release of Samba. This is the version
that production Samba servers should be running for all
-current bug-fixes. There have been several important issues
-fixes since the 3.0.6 release. See the "Changes" section for
+current bug-fixes. There have been several important issues
+fixes since the 3.0.6 release. See the "Changes" section for
details on exact updates.
Common bugs fixed in 3.0.7 include:
- o Fixes for two Denial of Service vulnerabalities
+ o Fixes for two Denial of Service vulnerabilities
(CVE ID# CAN-2004-0807 & CAN-2004-0808).
- o Winbind failure to return user entries under certain
+ o Winbind failure to return user entries under certain
conditions.
o Syntax errors in the OpenLDAP schema file (samba.schema).
o Printing errors caused by not setting default values
for the various printing commands.
-
-######################################################################
-Changes
-#######
+
+Changes since 3.0.6
+-------------------
+
+smb.conf changes
+----------------
Parameter Name Action
-------------- ------
winbind enable local accounts disabled by default
-
-
-Changes since 3.0.6
--------------------
-
+
+commits
+-------
o Jeremy Allison <jra@samba.org>
* Fix parsing of names ending in dot and a few other error
returns.
@@ -126,7 +356,7 @@ o Tim Potter <tpot@samba.org>
* BUG 1741: Define a struct nss_groupsbymem for HPUX 11 which
doesn't have one of its own.
-o Simo Source <idra@samba.org>
+o Simo Sorce <idra@samba.org>
* Fixup compile issues on AIX caused by broken strlen() and
strdup().
* Update debian packaging files.
@@ -141,8 +371,6 @@ o Qiao Yang <qyang@stbernard.com>
* BUG 1622: Only cache the user
-Changes for older versions follow below:
-
--------------------------------------------------
=============================
@@ -597,7 +825,7 @@ o Richard Sharpe <rsharpe@samba.org>
share mode locking requests fail.
-o Simo Source <idra@samba.org>
+o Simo Sorce <idra@samba.org>
* Update Debian stable & unstable packaging.
* Tidy up parametric options in testparm output.
@@ -1251,7 +1479,7 @@ o Richard Sharpe <rsharpe@samba.org>
* Add support for printing out the MAC address on nmblookup.
-o Simo Source <idra@samba.org>
+o Simo Sorce <idra@samba.org>
* Replace unknown_3 with fields_present in SAMR code.
* More length checks in strlcat().
diff --git a/examples/auth/Makefile b/examples/auth/Makefile
index dac28fdd40a..21d18de0758 100644
--- a/examples/auth/Makefile
+++ b/examples/auth/Makefile
@@ -18,10 +18,10 @@ default: $(AUTH_OBJS)
# Pattern rules
%.so: %.lo
- $(LIBTOOL) $(CC) -shared -o $@ $< $(LDFLAGS)
+ $(LIBTOOL) --mode=link $(CC) -shared -o $@ $< $(LDFLAGS)
%.lo: %.c
- $(LIBTOOL) $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
# Misc targets
diff --git a/examples/pdb/Makefile b/examples/pdb/Makefile
index a53cd5d5e2d..5c0eb6fc808 100644
--- a/examples/pdb/Makefile
+++ b/examples/pdb/Makefile
@@ -18,10 +18,10 @@ default: $(PDB_OBJS)
# Pattern rules
%.so: %.lo
- $(LIBTOOL) $(CC) -shared -o $@ $< $(LDFLAGS)
+ $(LIBTOOL) --mode=link $(CC) -shared -o $@ $< $(LDFLAGS)
%.lo: %.c
- $(LIBTOOL) $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
# Misc targets
diff --git a/source/autogen.sh b/source/autogen.sh
index 922cad8e613..e8160d21731 100755
--- a/source/autogen.sh
+++ b/source/autogen.sh
@@ -16,7 +16,7 @@ AUTOCONFFOUND="0"
##
for i in $TESTAUTOHEADER; do
if which $i > /dev/null 2>&1; then
- if [ `$i --version | head -n 1 | cut -d. -f 2` -ge 53 ]; then
+ if [ `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53 ]; then
AUTOHEADER=$i
AUTOHEADERFOUND="1"
break
@@ -30,7 +30,7 @@ done
for i in $TESTAUTOCONF; do
if which $i > /dev/null 2>&1; then
- if [ `$i --version | head -n 1 | cut -d. -f 2` -ge 53 ]; then
+ if [ `$i --version | head -n 1 | cut -d. -f 2 | tr -d [:alpha:]` -ge 53 ]; then
AUTOCONF=$i
AUTOCONFFOUND="1"
break
diff --git a/source/include/nterr.h b/source/include/nterr.h
index 19c70cffcc9..6cf5a756d29 100644
--- a/source/include/nterr.h
+++ b/source/include/nterr.h
@@ -27,9 +27,10 @@
/* Win32 Status codes. */
#define STATUS_BUFFER_OVERFLOW NT_STATUS(0x80000005)
+#define STATUS_NO_MORE_FILES NT_STATUS(0x80000006)
#define NT_STATUS_NO_MORE_ENTRIES NT_STATUS(0x8000001a)
-#define STATUS_MORE_ENTRIES NT_STATUS(0x0105)
+#define STATUS_MORE_ENTRIES NT_STATUS(0x0105)
#define STATUS_SOME_UNMAPPED NT_STATUS(0x0107)
#define ERROR_INVALID_PARAMETER NT_STATUS(0x0057)
#define ERROR_INSUFFICIENT_BUFFER NT_STATUS(0x007a)
diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index 1448074ea02..d8e4cefcfaa 100644
--- a/source/libads/ldap_printer.c
+++ b/source/libads/ldap_printer.c
@@ -36,7 +36,7 @@ ADS_STATUS ads_find_printer_on_server(ADS_STRUCT *ads, void **res,
status = ads_find_machine_acct(ads, res, servername);
if (!ADS_ERR_OK(status)) {
- DEBUG(1, ("ads_add_printer: cannot find host %s in ads\n",
+ DEBUG(1, ("ads_find_printer_on_server: cannot find host %s in ads\n",
servername));
return status;
}
diff --git a/source/libsmb/errormap.c b/source/libsmb/errormap.c
index 77c71fce13c..8ac1aed923b 100644
--- a/source/libsmb/errormap.c
+++ b/source/libsmb/errormap.c
@@ -102,6 +102,7 @@ static const struct {
* Not an official error, as only bit 0x80000000, not bits 0xC0000000 are set.
*/
{ERRDOS, ERRmoredata, STATUS_BUFFER_OVERFLOW},
+ {ERRDOS, ERRnofiles, STATUS_NO_MORE_FILES},
{ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH},
{ERRHRD, ERRgeneral, NT_STATUS_NONCONTINUABLE_EXCEPTION},
{ERRHRD, ERRgeneral, NT_STATUS_INVALID_DISPOSITION},
@@ -632,7 +633,7 @@ static const struct {
{ERRDOS, 14, NT_STATUS_SECTION_NOT_EXTENDED},
{ERRDOS, ERRremcd, NT_STATUS_DIRECTORY_NOT_EMPTY},
{ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE},
- {ERRDOS, ERRnofiles, NT_STATUS(0x80000006)},
+ {ERRDOS, ERRnofiles, STATUS_NO_MORE_FILES},
{ERRDOS, 19, NT_STATUS_MEDIA_WRITE_PROTECTED},
{ERRDOS, 21, NT_STATUS_NO_MEDIA_IN_DEVICE},
{ERRDOS, 22, NT_STATUS_INVALID_DEVICE_STATE},
diff --git a/source/libsmb/nterr.c b/source/libsmb/nterr.c
index b01451ea0fa..677c5d84c73 100644
--- a/source/libsmb/nterr.c
+++ b/source/libsmb/nterr.c
@@ -537,6 +537,7 @@ static nt_err_code_struct nt_errs[] =
{ "NT_STATUS_NO_MORE_ENTRIES", NT_STATUS_NO_MORE_ENTRIES },
{ "STATUS_MORE_ENTRIES", STATUS_MORE_ENTRIES },
{ "STATUS_SOME_UNMAPPED", STATUS_SOME_UNMAPPED },
+ { "STATUS_NO_MORE_FILES", STATUS_NO_MORE_FILES },
{ NULL, NT_STATUS(0) }
};
@@ -634,14 +635,15 @@ nt_err_code_struct nt_err_desc[] =
{ "Insufficient logon information", NT_STATUS_INSUFFICIENT_LOGON_INFO },
{ "License quota exceeded", NT_STATUS_LICENSE_QUOTA_EXCEEDED },
+ { "No more files", STATUS_NO_MORE_FILES },
{ NULL, NT_STATUS(0) }
};
-
/*****************************************************************************
- returns an NT error message. not amazingly helpful, but better than a number.
+ Returns an NT error message. not amazingly helpful, but better than a number.
*****************************************************************************/
+
const char *nt_errstr(NTSTATUS nt_code)
{
static pstring msg;
@@ -669,8 +671,7 @@ const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
int idx = 0;
while (nt_err_desc[idx].nt_errstr != NULL) {
- if (NT_STATUS_V(nt_err_desc[idx].nt_errcode) == NT_STATUS_V(nt_code))
- {
+ if (NT_STATUS_V(nt_err_desc[idx].nt_errcode) == NT_STATUS_V(nt_code)) {
return nt_err_desc[idx].nt_errstr;
}
idx++;
@@ -682,8 +683,9 @@ const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
}
/*****************************************************************************
- returns an NT_STATUS constant as a string for inclusion in autogen C code
+ Returns an NT_STATUS constant as a string for inclusion in autogen C code.
*****************************************************************************/
+
const char *get_nt_error_c_code(NTSTATUS nt_code)
{
static pstring out;
@@ -703,8 +705,9 @@ const char *get_nt_error_c_code(NTSTATUS nt_code)
}
/*****************************************************************************
- returns the NT_STATUS constant matching the string supplied (as an NTSTATUS)
+ Returns the NT_STATUS constant matching the string supplied (as an NTSTATUS)
*****************************************************************************/
+
NTSTATUS nt_status_string_to_code(char *nt_status_str)
{
int idx = 0;
@@ -718,7 +721,6 @@ NTSTATUS nt_status_string_to_code(char *nt_status_str)
return NT_STATUS_UNSUCCESSFUL;
}
-
/**
* Squash an NT_STATUS in line with security requirements.
* In an attempt to avoid giving the whole game away when users
diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c
index 6f5a86f43ae..249b9ccd8eb 100644
--- a/source/nsswitch/winbindd_user.c
+++ b/source/nsswitch/winbindd_user.c
@@ -58,6 +58,8 @@ static BOOL winbindd_fill_pwent(char *dom_name, char *user_name,
return False;
}
+ strlower_m(user_name);
+
/* Username */
fill_domain_username(output_username, dom_name, user_name);
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index a9197d35616..66006905385 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/nsswitch/winbindd_util.c
@@ -648,6 +648,7 @@ void fill_domain_username(fstring name, const char *domain, const char *user)
domain, lp_winbind_separator(),
user);
}
+ strlower_m(name);
}
/*
diff --git a/source/printing/printing.c b/source/printing/printing.c
index d9bc13d03a2..60adcc4d7f0 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -1184,10 +1184,6 @@ void start_background_queue(void)
exit(1);
}
- if (!print_backend_init()) {
- exit(1);
- }
-
message_register(MSG_PRINTER_UPDATE, print_queue_receive);
DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n"));
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index d50237905ae..e7b1fdb1d09 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -1292,7 +1292,7 @@ void do_drv_upgrade_printer(int msg_type, pid_t src, void *buf, size_t len)
/* all we care about currently is the change_id */
- result = mod_a_printer(*printer, 2);
+ result = mod_a_printer(printer, 2);
if (!W_ERROR_IS_OK(result)) {
DEBUG(3,("do_drv_upgrade_printer: mod_a_printer() failed with status [%s]\n",
dos_errstr(result)));
@@ -1396,7 +1396,7 @@ void reset_all_printerdata(int msg_type, pid_t src, void *buf, size_t len)
printer->info_2->printername, printer->info_2->drivername));
}
- result = mod_a_printer( *printer, 2 );
+ result = mod_a_printer( printer, 2 );
if ( !W_ERROR_IS_OK(result) ) {
DEBUG(3,("reset_all_printerdata: mod_a_printer() failed! (%s)\n",
get_dos_error_msg(result)));
@@ -6191,7 +6191,7 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
REG_SZ, (uint8*)buffer.buffer, buffer.uni_str_len*2 );
/* Update printer info */
- result = mod_a_printer(*printer, 2);
+ result = mod_a_printer(printer, 2);
done:
free_a_printer(&printer, 2);
@@ -7433,7 +7433,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_
}
/* write the ASCII on disk */
- err = mod_a_printer(*printer, 2);
+ err = mod_a_printer(printer, 2);
if (!W_ERROR_IS_OK(err)) {
free_a_printer(&printer,2);
return err;
@@ -7971,7 +7971,7 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP
status = set_printer_dataex( printer, SPOOL_PRINTERDATA_KEY, valuename,
type, data, real_len );
if ( W_ERROR_IS_OK(status) )
- status = mod_a_printer(*printer, 2);
+ status = mod_a_printer(printer, 2);
}
done:
@@ -8049,7 +8049,7 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY, valuename );
if ( W_ERROR_IS_OK(status) )
- mod_a_printer( *printer, 2 );
+ mod_a_printer( printer, 2 );
free_a_printer(&printer, 2);
@@ -8119,7 +8119,7 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
*/
if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
- status = mod_a_printer(*printer, 2);
+ status = mod_a_printer(printer, 2);
done:
if ( printer )
@@ -8186,7 +8186,7 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
*/
if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
- status = mod_a_printer(*printer, 2);
+ status = mod_a_printer(printer, 2);
done:
if ( printer )
@@ -8252,7 +8252,7 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
*/
if ( Printer->printer_type == PRINTER_HANDLE_IS_PRINTER )
- status = mod_a_printer(*printer, 2);
+ status = mod_a_printer(printer, 2);
done:
@@ -8864,7 +8864,7 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u,
REG_SZ, (void*)oid_string, strlen(oid_string)+1 );
}
- status = mod_a_printer(*printer, 2);
+ status = mod_a_printer(printer, 2);
}
free_a_printer(&printer, 2);
@@ -8914,7 +8914,7 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX
status = delete_printer_dataex( printer, keyname, valuename );
if ( W_ERROR_IS_OK(status) )
- mod_a_printer( *printer, 2 );
+ mod_a_printer( printer, 2 );
free_a_printer(&printer, 2);
@@ -9037,7 +9037,7 @@ WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u,
status = delete_all_printer_data( printer->info_2, key );
if ( W_ERROR_IS_OK(status) )
- status = mod_a_printer(*printer, 2);
+ status = mod_a_printer(printer, 2);
free_a_printer( &printer, 2 );
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 565046061cc..cdf607e2738 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -934,8 +934,8 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
make_dir_struct(p,mask,fname,size,mode,date,conn->case_sensitive);
dptr_fill(p+12,dptr_num);
numentries++;
+ p += DIR_STRUCT_SIZE;
}
- p += DIR_STRUCT_SIZE;
}
}
} /* if (ok ) */
@@ -949,18 +949,12 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
(X/Open spec) */
if(ok && expect_close && numentries == 0 && status_len == 0) {
- if (Protocol < PROTOCOL_NT1) {
- SCVAL(outbuf,smb_rcls,ERRDOS);
- SSVAL(outbuf,smb_err,ERRnofiles);
- }
- /* Also close the dptr - we know it's gone */
+ /* Close the dptr - we know it's gone */
dptr_close(&dptr_num);
+ return ERROR_BOTH(STATUS_NO_MORE_FILES,ERRDOS,ERRnofiles);
} else if (numentries == 0 || !ok) {
- if (Protocol < PROTOCOL_NT1) {
- SCVAL(outbuf,smb_rcls,ERRDOS);
- SSVAL(outbuf,smb_err,ERRnofiles);
- }
dptr_close(&dptr_num);
+ return ERROR_BOTH(STATUS_NO_MORE_FILES,ERRDOS,ERRnofiles);
}
/* If we were called as SMBfunique, then we can close the dirptr now ! */