[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Fri Aug 6 04:17:02 MDT 2010
The branch, master has been updated
via fe5f4d9... s3-printing: cope with missing printers in print migration
from a2607a6... s4:ntlmssp Adjust Samba4 ntlmssp code to look more like the code in Samba3.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fe5f4d91ce5067c4222648967719f67f6e670642
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Aug 6 13:06:42 2010 +1000
s3-printing: cope with missing printers in print migration
The printers database may be completely missing in a new install, and
we may have SECDESC entries for printers that have been removed. Don't
consider these fatal errors in the migration.
Signed-off-by: Günther Deschner <gd at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/printing/nt_printing_migrate.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/printing/nt_printing_migrate.c b/source3/printing/nt_printing_migrate.c
index 1ee5578..7e7db56 100644
--- a/source3/printing/nt_printing_migrate.c
+++ b/source3/printing/nt_printing_migrate.c
@@ -420,6 +420,10 @@ static NTSTATUS migrate_secdesc(TALLOC_CTX *mem_ctx,
&hnd,
&result);
if (!NT_STATUS_IS_OK(status)) {
+ if (W_ERROR_EQUAL(WERR_INVALID_PRINTER_NAME, result)) {
+ DEBUG(3, ("Ignoring missing printer %s\n", key_name));
+ return NT_STATUS_OK;
+ }
if (!W_ERROR_IS_OK(result)) {
status = werror_to_ntstatus(result);
}
@@ -493,6 +497,12 @@ static NTSTATUS migrate_internal(TALLOC_CTX *mem_ctx,
int rc;
tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDONLY, 0600);
+ if (tdb == NULL && errno == ENOENT) {
+ /* if we have no printers database then migration is
+ considered successful */
+ DEBUG(4, ("No printers database to migrate in %s\n", tdb_path));
+ return NT_STATUS_OK;
+ }
if (tdb == NULL) {
DEBUG(2, ("Failed to open tdb file: %s\n", tdb_path));
return NT_STATUS_NO_SUCH_FILE;
--
Samba Shared Repository
More information about the samba-cvs
mailing list