summaryrefslogtreecommitdiffstats
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-17 03:19:17 +0000
committerJeremy Allison <jra@samba.org>2001-11-17 03:19:17 +0000
commit02eda2e251e6dcb6e0db5cd9c3cbcfa765f3d630 (patch)
tree6b0d7c4ae77b1673510672c49a0c68b844283f35 /source3/passdb
parent355124adaf512eeb04a0badfcfefbce63f31f023 (diff)
downloadsamba-02eda2e251e6dcb6e0db5cd9c3cbcfa765f3d630.tar.gz
samba-02eda2e251e6dcb6e0db5cd9c3cbcfa765f3d630.tar.xz
samba-02eda2e251e6dcb6e0db5cd9c3cbcfa765f3d630.zip
Tidyups when I was doing the big merge...
Jeremy. (This used to be commit 9148bb9eaa67de60c3b0b4709a9c05a840c20c66)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/secrets.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 69b55b4d8c..86ef024bb0 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -31,7 +31,8 @@ BOOL secrets_init(void)
{
pstring fname;
- if (tdb) return True;
+ if (tdb)
+ return True;
pstrcpy(fname, lp_private_dir());
pstrcat(fname,"/secrets.tdb");
@@ -51,11 +52,13 @@ BOOL secrets_init(void)
void *secrets_fetch(char *key, size_t *size)
{
TDB_DATA kbuf, dbuf;
- if (!tdb) return False;
+ if (!tdb)
+ return False;
kbuf.dptr = key;
kbuf.dsize = strlen(key);
dbuf = tdb_fetch(tdb, kbuf);
- if (size) *size = dbuf.dsize;
+ if (size)
+ *size = dbuf.dsize;
return dbuf.dptr;
}
@@ -64,7 +67,8 @@ void *secrets_fetch(char *key, size_t *size)
BOOL secrets_store(char *key, void *data, size_t size)
{
TDB_DATA kbuf, dbuf;
- if (!tdb) return False;
+ if (!tdb)
+ return False;
kbuf.dptr = key;
kbuf.dsize = strlen(key);
dbuf.dptr = data;
@@ -78,7 +82,8 @@ BOOL secrets_store(char *key, void *data, size_t size)
BOOL secrets_delete(char *key)
{
TDB_DATA kbuf;
- if (!tdb) return False;
+ if (!tdb)
+ return False;
kbuf.dptr = key;
kbuf.dsize = strlen(key);
return tdb_delete(tdb, kbuf) == 0;