The branch, master has been updated
       via  1018dd1 s3-lib: Rely on uint64_t in conv_str_size()
       via  e1eae82 kerberos: Only include gssapi/gssapi_krb5.h when available
       via  b1f2547 s3-waf: Add dependency on popt to fix build on FreeBSD
      from  de87f54 Add POSIX O_RDONLY test of a directory for bug #8112 - 
POSIX extension opens of a directory are denied with EISDIR.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1018dd182686f5b3a6db3d08294c78305521e4f4
Author: Andrew Bartlett <[email protected]>
Date:   Sat Apr 30 12:52:11 2011 +1000

    s3-lib: Rely on uint64_t in conv_str_size()
    
    Autobuild-User: Andrew Bartlett <[email protected]>
    Autobuild-Date: Sat Apr 30 05:58:35 CEST 2011 on sn-devel-104

commit e1eae822856c076f63874d8d3b07691b3154848d
Author: Andrew Bartlett <[email protected]>
Date:   Sat Apr 30 12:05:25 2011 +1000

    kerberos: Only include gssapi/gssapi_krb5.h when available

commit b1f2547699d335287d5f007d108a067eb7a0203d
Author: Andrew Bartlett <[email protected]>
Date:   Sat Apr 30 10:50:50 2011 +1000

    s3-waf: Add dependency on popt to fix build on FreeBSD

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/system/kerberos.h           |    2 +
 source3/configure.in                    |    2 +-
 source3/include/proto.h                 |    2 +-
 source3/lib/util_str.c                  |   43 +++++++++---------------------
 source3/wscript                         |    2 +-
 source3/wscript_build                   |    2 +-
 source4/heimdal_build/wscript_configure |    1 +
 7 files changed, 20 insertions(+), 34 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/system/kerberos.h b/lib/replace/system/kerberos.h
index 10d5f76..6d8c59f 100644
--- a/lib/replace/system/kerberos.h
+++ b/lib/replace/system/kerberos.h
@@ -45,7 +45,9 @@
 #include <gssapi.h>
 #endif
 
+#if HAVE_GSSAPI_GSSAPI_KRB5_H
 #include <gssapi/gssapi_krb5.h>
+#endif
 
 #endif
 #endif
diff --git a/source3/configure.in b/source3/configure.in
index 3624c25..8164a44 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3791,7 +3791,7 @@ if test x"$with_ads_support" != x"no"; then
 
   # now check for gssapi headers.  This is also done here to allow for
   # different kerberos include paths
-  AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h 
gssapi/gssapi_ext.h com_err.h)
+  AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h 
gssapi/gssapi_ext.h gssapi/gssapi_krb5.h com_err.h)
 
   ##################################################################
   # we might need the k5crypto and com_err libraries on some systems
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 170b9ad..fe981f1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1007,7 +1007,7 @@ char *ipstr_list_make(char **ipstr_list,
 int ipstr_list_parse(const char *ipstr_list, struct ip_service **ip_list);
 void ipstr_list_free(char* ipstr_list);
 uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
-SMB_OFF_T conv_str_size(const char * str);
+uint64_t conv_str_size(const char * str);
 bool add_string_to_array(TALLOC_CTX *mem_ctx,
                         const char *str, const char ***strings,
                         int *num);
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 07a0589..b15dd79 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -1206,25 +1206,17 @@ uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const 
char **entptr)
  *
  *  Returns 0 if the string can't be converted.
  */
-SMB_OFF_T conv_str_size(const char * str)
+uint64_t conv_str_size(const char * str)
 {
-       SMB_OFF_T lval_orig;
-        SMB_OFF_T lval;
+       uint64_t lval_orig;
+        uint64_t lval;
        char * end;
 
         if (str == NULL || *str == '\0') {
                 return 0;
         }
 
-#ifdef HAVE_STRTOULL
-       if (sizeof(SMB_OFF_T) == 8) {
-               lval = strtoull(str, &end, 10 /* base */);
-       } else {
-               lval = strtoul(str, &end, 10 /* base */);
-       }
-#else
-       lval = strtoul(str, &end, 10 /* base */);
-#endif
+       lval = strtoull(str, &end, 10 /* base */);
 
         if (end == NULL || end == str) {
                 return 0;
@@ -1237,32 +1229,23 @@ SMB_OFF_T conv_str_size(const char * str)
        lval_orig = lval;
 
        if (strwicmp(end, "K") == 0) {
-               lval *= (SMB_OFF_T)1024;
+               lval *= 1024ULL;
        } else if (strwicmp(end, "M") == 0) {
-               lval *= ((SMB_OFF_T)1024 * (SMB_OFF_T)1024);
+               lval *= (1024ULL * 1024ULL);
        } else if (strwicmp(end, "G") == 0) {
-               lval *= ((SMB_OFF_T)1024 * (SMB_OFF_T)1024 *
-                        (SMB_OFF_T)1024);
+               lval *= (1024ULL * 1024ULL *
+                        1024ULL);
        } else if (strwicmp(end, "T") == 0) {
-               lval *= ((SMB_OFF_T)1024 * (SMB_OFF_T)1024 *
-                        (SMB_OFF_T)1024 * (SMB_OFF_T)1024);
+               lval *= (1024ULL * 1024ULL *
+                        1024ULL * 1024ULL);
        } else if (strwicmp(end, "P") == 0) {
-               lval *= ((SMB_OFF_T)1024 * (SMB_OFF_T)1024 *
-                        (SMB_OFF_T)1024 * (SMB_OFF_T)1024 *
-                        (SMB_OFF_T)1024);
+               lval *= (1024ULL * 1024ULL *
+                        1024ULL * 1024ULL *
+                        1024ULL);
        } else {
                return 0;
        }
 
-       /*
-        * Primitive attempt to detect wrapping on platforms with
-        * 4-byte SMB_OFF_T. It's better to let the caller handle a
-        * failure than some random number.
-        */
-       if (lval_orig <= lval) {
-               return 0;
-       }
-
        return lval;
 }
 
diff --git a/source3/wscript b/source3/wscript
index 175bbf1..78ff40c 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -619,7 +619,7 @@ msg.msg_acctrightslen = sizeof(fd);
             conf.check_cfg(path="krb5-config", args="--cflags --libs",
                        package="gssapi", uselib_store="krb5")
         conf.CHECK_HEADERS('krb5.h krb5/locate_plugin.h', lib='krb5')
-        conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h 
gssapi/gssapi_ext.h com_err.h', lib='krb5')
+        conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h 
gssapi/gssapi_ext.h gssapi/gssapi_krb5.h com_err.h', lib='krb5')
 
         if conf.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
             conf.env['WINBIND_KRB5_LOCATOR'] = 'bin/winbind_krb5_locator.so'
diff --git a/source3/wscript_build b/source3/wscript_build
index 94575cd..143f90a 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -668,7 +668,7 @@ bld.SAMBA3_LIBRARY('netapi',
                     RPC_CLIENT_SCHANNEL LIB_SMBCONF REG_SMBCONF TOKEN_UTIL
                     LIBCLI_SAMR LIBCLI_LSA3 LIBRPCCLI_NETLOGON
                     RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_INITSHUTDOWN
-                    INIT_NETLOGON INIT_SAMR''',
+                    INIT_NETLOGON INIT_SAMR POPT_SAMBA3''',
                     public_headers='../source3/lib/netapi/netapi.h',
                     vnum='0',
                     vars=locals())
diff --git a/source4/heimdal_build/wscript_configure 
b/source4/heimdal_build/wscript_configure
index cd2a70f..6552d3a 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -73,6 +73,7 @@ conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)
 # setup the right defines for a in-tree heimdal build
 Logs.info("Using in-tree heimdal kerberos defines")
 conf.define('HAVE_GSSAPI_GSSAPI_H', 1)
+conf.define('HAVE_GSSAPI_GSSAPI_KRB5_H', 1)
 conf.define('HAVE_AP_OPTS_USE_SUBKEY', 1)
 conf.define('HAVE_KRB5_ADDRESSES', 1)
 conf.define('HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK', 1)


-- 
Samba Shared Repository

Reply via email to