lib/signal.o lib/slprintf.o lib/system.o lib/doscalls.o lib/time.o \
lib/ufc.o lib/genrand.o lib/username.o lib/access.o lib/smbrun.o \
lib/bitmap.o lib/crc32.o lib/snprintf.o \
- lib/util_array.o lib/util_unixsd.o lib/util_str.o lib/util_sid.o \
+ lib/util_array.o lib/util_str.o lib/util_sid.o \
lib/util_unistr.o lib/util_file.o \
lib/util.o lib/util_sock.o lib/util_sec.o smbd/ssl.o \
lib/talloc.o lib/hash.o lib/substitute.o lib/fsusage.o \
smbd/reply.o smbd/trans2.o smbd/uid.o \
smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o smbd/blocking.o \
smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \
- lib/msrpc-client.o lib/msrpc_use.o \
+ lib/util_unixsd.o lib/msrpc-client.o lib/msrpc_use.o \
rpc_parse/parse_creds.o \
smbd/process.o smbd/oplock.o smbd/service.o smbd/error.o \
printing/printfsp.o
SSVAL(dest, 0, 0);
}
+/*******************************************************************
+ * HORRIBLE HACK!
+********************************************************************/
+void unistr_to_ascii(char *dest, const uint16 *src, int len)
+{
+ char *destend = dest + len;
+ register uint16 c;
+
+ while (dest < destend)
+ {
+ c = *(src++);
+ if (c == 0)
+ {
+ break;
+ }
+
+ *(dest++) = (char)c;
+ }
+
+ *dest = 0;
+}
+
/*******************************************************************
Pull a DOS codepage string out of a UNICODE array. len is in bytes.
********************************************************************/
static BOOL convert_devicemode(DEVICEMODE devmode, NT_DEVICEMODE *nt_devmode)
{
- unistr_to_ascii(nt_devmode->devicename, (char *)devmode.devicename.buffer, 31);
- unistr_to_ascii(nt_devmode->formname, (char *)devmode.formname.buffer, 31);
+ unistr_to_dos(nt_devmode->devicename, (char *)devmode.devicename.buffer, 31);
+ unistr_to_dos(nt_devmode->formname, (char *)devmode.formname.buffer, 31);
nt_devmode->specversion=devmode.specversion;
nt_devmode->driverversion=devmode.driverversion;