diff options
Diffstat (limited to 'source4/lib/util')
-rw-r--r-- | source4/lib/util/attr.h | 2 | ||||
-rw-r--r-- | source4/lib/util/fault.c | 2 | ||||
-rw-r--r-- | source4/lib/util/time.c | 8 | ||||
-rw-r--r-- | source4/lib/util/time.h | 5 | ||||
-rw-r--r-- | source4/lib/util/util.h | 3 | ||||
-rw-r--r-- | source4/lib/util/util_ldb.c | 17 |
6 files changed, 24 insertions, 13 deletions
diff --git a/source4/lib/util/attr.h b/source4/lib/util/attr.h index 8f6c4f5d8a..f64b272a67 100644 --- a/source4/lib/util/attr.h +++ b/source4/lib/util/attr.h @@ -29,13 +29,11 @@ /** Feel free to add definitions for other compilers here. */ #endif -#ifndef _PUBLIC_ #ifdef HAVE_VISIBILITY_ATTR # define _PUBLIC_ __attribute__((visibility("default"))) #else # define _PUBLIC_ #endif -#endif #ifndef _DEPRECATED_ #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) diff --git a/source4/lib/util/fault.c b/source4/lib/util/fault.c index cd347a5ef9..cb51cbd859 100644 --- a/source4/lib/util/fault.c +++ b/source4/lib/util/fault.c @@ -178,7 +178,7 @@ _NORETURN_ static void sig_fault(int sig) /* we have a fault handler, call it. It may not return. */ fault_handlers.fault_handler(sig); } - /* If it returns or doean't exist, use regular reporter */ + /* If it returns or doesn't exist, use regular reporter */ fault_report(sig); } diff --git a/source4/lib/util/time.c b/source4/lib/util/time.c index fc51498009..a181885806 100644 --- a/source4/lib/util/time.c +++ b/source4/lib/util/time.c @@ -612,3 +612,11 @@ _PUBLIC_ int get_time_zone(time_t t) return 0; return tm_diff(&tm_utc,tm); } + +/** + check if 2 NTTIMEs are equal. +*/ +bool nt_time_equal(NTTIME *t1, NTTIME *t2) +{ + return *t1 == *t2; +} diff --git a/source4/lib/util/time.h b/source4/lib/util/time.h index 557c5d4eab..1ab976ca78 100644 --- a/source4/lib/util/time.h +++ b/source4/lib/util/time.h @@ -224,6 +224,9 @@ _PUBLIC_ void nttime_to_timeval(struct timeval *tv, NTTIME t); */ _PUBLIC_ int get_time_zone(time_t t); - +/** + check if 2 NTTIMEs are equal. +*/ +bool nt_time_equal(NTTIME *t1, NTTIME *t2); #endif /* _SAMBA_TIME_H_ */ diff --git a/source4/lib/util/util.h b/source4/lib/util/util.h index 9e106052f2..550b60c625 100644 --- a/source4/lib/util/util.h +++ b/source4/lib/util/util.h @@ -21,6 +21,8 @@ #ifndef _SAMBA_UTIL_H_ #define _SAMBA_UTIL_H_ +#include "util/attr.h" + #include "charset/charset.h" /* for TALLOC_CTX */ @@ -36,7 +38,6 @@ struct smbsrv_tcon; extern const char *logfile; extern const char *panic_action; -#include "util/attr.h" #include "util/time.h" #include "util/data_blob.h" #include "util/xfile.h" diff --git a/source4/lib/util/util_ldb.c b/source4/lib/util/util_ldb.c index a8719af190..f1b42effd8 100644 --- a/source4/lib/util/util_ldb.c +++ b/source4/lib/util/util_ldb.c @@ -1,21 +1,21 @@ -/* +/* Unix SMB/CIFS implementation. common share info functions Copyright (C) Andrew Tridgell 2004 Copyright (C) Tim Potter 2004 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -56,7 +56,7 @@ int gendb_search_v(struct ldb_context *ldb, if (ret == LDB_SUCCESS) { talloc_steal(mem_ctx, res->msgs); - DEBUG(6,("gendb_search_v: %s %s -> %d\n", + DEBUG(6,("gendb_search_v: %s %s -> %d\n", basedn?ldb_dn_get_linearized(basedn):"NULL", expr?expr:"NULL", res->count)); @@ -67,7 +67,8 @@ int gendb_search_v(struct ldb_context *ldb, ret = 0; *msgs = NULL; } else { - DEBUG(4,("gendb_search_v: search failed: %s", ldb_errstring(ldb))); + DEBUG(4,("gendb_search_v: search failed: %s\n", + ldb_errstring(ldb))); ret = -1; } @@ -80,7 +81,7 @@ int gendb_search_v(struct ldb_context *ldb, search the LDB for the specified attributes - varargs variant */ int gendb_search(struct ldb_context *ldb, - TALLOC_CTX *mem_ctx, + TALLOC_CTX *mem_ctx, struct ldb_dn *basedn, struct ldb_message ***res, const char * const *attrs, @@ -101,7 +102,7 @@ int gendb_search(struct ldb_context *ldb, */ int gendb_search_dn(struct ldb_context *ldb, - TALLOC_CTX *mem_ctx, + TALLOC_CTX *mem_ctx, struct ldb_dn *dn, struct ldb_message ***res, const char * const *attrs) |