diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-01-16 12:09:48 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-01-16 12:09:48 +0300 |
commit | 68694369fc96354452979b07425f3f48c4f73bbe (patch) | |
tree | 6f4f9870ad48babe85c26af0b86d143e446a0cfe /source3/lib/util.c | |
parent | f426949e8861b3a97d321516edbcbd771b7d6273 (diff) | |
download | samba-68694369fc96354452979b07425f3f48c4f73bbe.tar.gz samba-68694369fc96354452979b07425f3f48c4f73bbe.tar.bz2 samba-68694369fc96354452979b07425f3f48c4f73bbe.zip |
Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb)
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbbb2d081fc23908bafcad04650bfacea)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 0653fc9d3f..bc3eaa8d5e 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -506,6 +506,19 @@ bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf) } /******************************************************************* + Check if a unix domain socket exists - call vfs_file_exist for samba files. +********************************************************************/ + +bool socket_exist(const char *fname) +{ + SMB_STRUCT_STAT st; + if (sys_stat(fname,&st) != 0) + return(False); + + return S_ISSOCK(st.st_mode); +} + +/******************************************************************* Check a files mod time. ********************************************************************/ |