summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-24 18:38:40 -0700
committerTim Prouty <tprouty@samba.org>2009-07-24 18:51:41 -0700
commitf49f3fcb0127b6ed19fec94f93658180ead04ac5 (patch)
tree0a954660d72ff5e03b6a370f3e6bad68d0ce6f74 /source3/printing
parent7197ba3abd6dfad74a28d5e3f8a73367ab22810b (diff)
downloadsamba-f49f3fcb0127b6ed19fec94f93658180ead04ac5.tar.gz
samba-f49f3fcb0127b6ed19fec94f93658180ead04ac5.tar.bz2
samba-f49f3fcb0127b6ed19fec94f93658180ead04ac5.zip
s3: Convert a few callers of unix_convert() over to filename_convert()
This patch also changes the unix convert flags to make sure the correct semantics are preservered for allowing/disallowing wildcards in the last component of the path.
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 3e206becf4..26b8d9d81d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -5145,6 +5145,24 @@ bool printer_driver_files_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info )
return in_use;
}
+static NTSTATUS driver_unlink_internals(connection_struct *conn,
+ const char *name)
+{
+ struct smb_filename *smb_fname = NULL;
+ NTSTATUS status;
+
+ status = create_synthetic_smb_fname(talloc_tos(), name, NULL, NULL,
+ &smb_fname);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ status = unlink_internals(conn, NULL, 0, smb_fname, false);
+
+ TALLOC_FREE(smb_fname);
+ return status;
+}
+
/****************************************************************************
Actually delete the driver files. Make sure that
printer_driver_files_in_use() return False before calling
@@ -5197,7 +5215,7 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
if ( (s = strchr( &info_3->driverpath[1], '\\' )) != NULL ) {
file = s;
DEBUG(10,("deleting driverfile [%s]\n", s));
- unlink_internals(conn, NULL, 0, file, False);
+ driver_unlink_internals(conn, file);
}
}
@@ -5205,7 +5223,7 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
if ( (s = strchr( &info_3->configfile[1], '\\' )) != NULL ) {
file = s;
DEBUG(10,("deleting configfile [%s]\n", s));
- unlink_internals(conn, NULL, 0, file, False);
+ driver_unlink_internals(conn, file);
}
}
@@ -5213,7 +5231,7 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
if ( (s = strchr( &info_3->datafile[1], '\\' )) != NULL ) {
file = s;
DEBUG(10,("deleting datafile [%s]\n", s));
- unlink_internals(conn, NULL, 0, file, False);
+ driver_unlink_internals(conn, file);
}
}
@@ -5221,7 +5239,7 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
if ( (s = strchr( &info_3->helpfile[1], '\\' )) != NULL ) {
file = s;
DEBUG(10,("deleting helpfile [%s]\n", s));
- unlink_internals(conn, NULL, 0, file, False);
+ driver_unlink_internals(conn, file);
}
}
@@ -5236,7 +5254,7 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
if ( (p = strchr( info_3->dependentfiles[i]+1, '\\' )) != NULL ) {
file = p;
DEBUG(10,("deleting dependent file [%s]\n", file));
- unlink_internals(conn, NULL, 0, file, False);
+ driver_unlink_internals(conn, file);
}
i++;