summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-07 03:44:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:15 -0500
commit6410f02fe5d2da18d8a3e5e135fb6875c463a6fb (patch)
tree7934e1d26a71e589272ce9358ea2cde895c110d7 /source3/libsmb
parent94eb7d93d83346034ccb5d3026afb63a88a890de (diff)
downloadsamba-6410f02fe5d2da18d8a3e5e135fb6875c463a6fb.tar.gz
samba-6410f02fe5d2da18d8a3e5e135fb6875c463a6fb.tar.bz2
samba-6410f02fe5d2da18d8a3e5e135fb6875c463a6fb.zip
r18199: Allow winbindd to delete a saf_ entry if it knows
it can't talk to it. Jeremy. (This used to be commit 7385a076f8fd351472d37d9363304948e88f9f99)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/namequery.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 5cd09fd04f..aeeeb3372c 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -77,6 +77,30 @@ BOOL saf_store( const char *domain, const char *servername )
return ret;
}
+BOOL saf_delete( const char *domain, const char *servername )
+{
+ char *key;
+ BOOL ret = False;
+
+ if ( !domain || !servername ) {
+ DEBUG(2,("saf_delete: Refusing to store empty domain or servername!\n"));
+ return False;
+ }
+
+ if ( !gencache_init() )
+ return False;
+
+ key = saf_key(domain);
+ ret = gencache_del(key);
+
+ if (ret) {
+ DEBUG(10,("saf_delete: domain = [%s], server = [%s]\n",
+ domain, servername));
+ }
+ SAFE_FREE( key );
+ return ret;
+}
+
/****************************************************************************
****************************************************************************/