diff options
author | Simo Sorce <idra@samba.org> | 2001-09-27 02:05:30 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-09-27 02:05:30 +0000 |
commit | 59a02ecae1b0251da5cdd5e34653f7eb14704e72 (patch) | |
tree | a2f5c27411b1d5f19c8c7724181275eb12b5a2d1 /source3/smbd | |
parent | c61d1a167974ffd7788253373ec0920cd802805b (diff) | |
download | samba-59a02ecae1b0251da5cdd5e34653f7eb14704e72.tar.gz samba-59a02ecae1b0251da5cdd5e34653f7eb14704e72.tar.bz2 samba-59a02ecae1b0251da5cdd5e34653f7eb14704e72.zip |
minor fixes
(This used to be commit 57e639bbdd115b51362caf7e3db4ba34ccdeddc2)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/mangle.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 0de2188bcf..c0a3dacf08 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -1006,15 +1006,10 @@ static BOOL init_mangle_tdb(void) slprintf(tdbfile, sizeof(tdbfile)-1, "%s/%s", lp_private_dir(), MANGLE_TDB_FILE_NAME); /* Open tdb */ - if (!(global_mt_ent.mangle_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR, 0600))) + if (!(global_mt_ent.mangle_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR | O_CREAT, 0600))) { - DEBUG(0, ("Unable to open Mangle TDB, trying create new!\n")); - /* create a new one if it does not exist */ - if (!(global_mt_ent.mangle_tdb = tdb_open_log(tdbfile, 0, TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL, 0600))) - { - DEBUG(0, ("Unable to create Mangle TDB (%s) !!!", tdbfile)); - return False; - } + DEBUG(0, ("Unable to open Mangle TDB\n")); + return False; } } @@ -1153,7 +1148,7 @@ smb_ucs2_t *unmangle(const smb_ucs2_t *mangled) } strupper_w(temp); /* set search key */ - pull_ucs2(NULL, mufname, temp, sizeof(mufname), 0, STR_TERMINATE); + ucs2_to_dos(NULL, mufname, temp, sizeof(mufname), 0, STR_TERMINATE); SAFE_FREE(temp); slprintf(keystr, sizeof(keystr)-1, "%s%s", MANGLED_PREFIX, mufname); key.dptr = keystr; @@ -1254,7 +1249,7 @@ smb_ucs2_t *_mangle(const smb_ucs2_t *unmangled) snprintf(num, 7, "%d", c); strncat_wa(temp, num, n); - pull_ucs2(NULL, mufname, temp, sizeof(mufname), 0, STR_TERMINATE); + ucs2_to_dos(NULL, mufname, temp, sizeof(mufname), 0, STR_TERMINATE); if (strlen(mufname) > 8) { n++; |