summaryrefslogtreecommitdiff
path: root/source3/lib/util_pw.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-13 05:20:26 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-13 05:20:26 +0200
commitaa982895e5c13497144740e90ff9646e1d1cf995 (patch)
treef21159a823cd8fd329dc073a841c576da2450fcc /source3/lib/util_pw.c
parentd5a11f9679be9d053838074f1dad5a0ca880750f (diff)
downloadsamba-aa982895e5c13497144740e90ff9646e1d1cf995.tar.gz
samba-aa982895e5c13497144740e90ff9646e1d1cf995.tar.bz2
samba-aa982895e5c13497144740e90ff9646e1d1cf995.zip
Add data_blob_string_const_null() function that includes the terminating
null byte and use it in Samba 3. This matches the behaviour prior to my data_blob changes.
Diffstat (limited to 'source3/lib/util_pw.c')
-rw-r--r--source3/lib/util_pw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index 428378505f..c0d37f1094 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -47,7 +47,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
struct passwd *temp, *cached;
temp = (struct passwd *)memcache_lookup_talloc(
- NULL, GETPWNAM_CACHE, data_blob_string_const(name));
+ NULL, GETPWNAM_CACHE, data_blob_string_const_null(name));
if (temp != NULL) {
return tcopy_passwd(mem_ctx, temp);
}
@@ -65,7 +65,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
return temp;
}
- memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const(name),
+ memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const_null(name),
cached);
return tcopy_passwd(mem_ctx, temp);
}