[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Fri Feb 17 05:49:02 MST 2012
The branch, master has been updated
via 476d503 lib/util: Remove unused sys_sendto()
via 245d47f lib/util: Remove unused sys_recv()
via 057b87d lib/util: Remove unused sys_inet_makeaddr()
via c8c3f0c lib/util: Remove unused sys_gethostbyname()
via b190e3c s3-lib: Remove unused standard_sub_conn()
via 846a697 s3-lib Remove unused sys_fcntl_long()
via 59d1faa s3-lib Remove unused sys_fseek()
via 3b5326e s3-registry Remove unused dup_registry_value() and free_registry_value()
from c35a7e8 auth: Allow the netbios name and domain to be set from winbindd in ntlm_auth3
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 476d503d246a563c552a3ba8d7fe3230bec5914e
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:58:27 2012 +1100
lib/util: Remove unused sys_sendto()
Found by callcatcher.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Fri Feb 17 13:48:05 CET 2012 on sn-devel-104
commit 245d47f233fcc53aa93503cd876aaf487d89d6e7
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:57:21 2012 +1100
lib/util: Remove unused sys_recv()
Found by callcatcher.
Andrew Bartlett
commit 057b87d0bd4dec88f414dd0dffd0c3481d26faa4
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:55:10 2012 +1100
lib/util: Remove unused sys_inet_makeaddr()
Found by callcatcher.
Andrew Bartlett
commit c8c3f0c608aa1b11717f1da6793ac9ca0d38a14f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:54:24 2012 +1100
lib/util: Remove unused sys_gethostbyname()
Found by callcatcher.
Andrew Bartlett
commit b190e3cd79a7de79c62ad58fdc9d768ae96dc5e9
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:51:22 2012 +1100
s3-lib: Remove unused standard_sub_conn()
commit 846a697e20478798288afb43cdb7a9f389a15c69
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:05:58 2012 +1100
s3-lib Remove unused sys_fcntl_long()
commit 59d1faa1a30abd2a4e3cdaf0db1aa736283f822c
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 12:04:23 2012 +1100
s3-lib Remove unused sys_fseek()
commit 3b5326e987e3fe1f57502cbfd9d25b14cdf2b434
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 9 11:06:13 2012 +1100
s3-registry Remove unused dup_registry_value() and free_registry_value()
-----------------------------------------------------------------------
Summary of changes:
lib/util/samba_util.h | 8 -----
lib/util/system.c | 51 ------------------------------
source3/include/proto.h | 5 ---
source3/lib/substitute.c | 19 -----------
source3/lib/system.c | 67 ----------------------------------------
source3/registry/reg_objects.c | 54 --------------------------------
source3/registry/reg_objects.h | 2 -
7 files changed, 0 insertions(+), 206 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index 8e8e7c1..a0989d5 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -117,14 +117,6 @@ void CatchChildLeaveStatus(void);
void *sys_memalign( size_t align, size_t size );
-/**************************************************************************
-A wrapper for gethostbyname() that tries avoids looking up hostnames
-in the root domain, which can cause dial-on-demand links to come up for no
-apparent reason.
-****************************************************************************/
-_PUBLIC_ struct hostent *sys_gethostbyname(const char *name);
-_PUBLIC_ struct in_addr sys_inet_makeaddr(int net, int host);
-
/**
* Wrapper for fork used to invalid pid cache.
**/
diff --git a/lib/util/system.c b/lib/util/system.c
index 1e80f1a..8625229 100644
--- a/lib/util/system.c
+++ b/lib/util/system.c
@@ -76,57 +76,6 @@ void *sys_memalign( size_t align, size_t size )
}
/**************************************************************************
-A wrapper for gethostbyname() that tries avoids looking up hostnames
-in the root domain, which can cause dial-on-demand links to come up for no
-apparent reason.
-****************************************************************************/
-
-_PUBLIC_ struct hostent *sys_gethostbyname(const char *name)
-{
-#ifdef REDUCE_ROOT_DNS_LOOKUPS
- char query[256], hostname[256];
- char *domain;
-
- /* Does this name have any dots in it? If so, make no change */
-
- if (strchr(name, '.'))
- return(gethostbyname(name));
-
- /* Get my hostname, which should have domain name
- attached. If not, just do the gethostname on the
- original string.
- */
-
- gethostname(hostname, sizeof(hostname) - 1);
- hostname[sizeof(hostname) - 1] = 0;
- if ((domain = strchr(hostname, '.')) == NULL)
- return(gethostbyname(name));
-
- /* Attach domain name to query and do modified query.
- If names too large, just do gethostname on the
- original string.
- */
-
- if((strlen(name) + strlen(domain)) >= sizeof(query))
- return(gethostbyname(name));
-
- slprintf(query, sizeof(query)-1, "%s%s", name, domain);
- return(gethostbyname(query));
-#else /* REDUCE_ROOT_DNS_LOOKUPS */
- return(gethostbyname(name));
-#endif /* REDUCE_ROOT_DNS_LOOKUPS */
-}
-
-_PUBLIC_ struct in_addr sys_inet_makeaddr(int net, int host)
-{
- struct in_addr in;
- struct in_addr in2;
- in = inet_makeaddr(net, host);
- in2.s_addr = in.s_addr;
- return in2;
-}
-
-/**************************************************************************
Wrapper for fork. Ensures we clear our pid cache.
****************************************************************************/
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7ca2f87..7adb2c4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -265,7 +265,6 @@ void standard_sub_advanced(const char *servicename, const char *user,
const char *connectpath, gid_t gid,
const char *smb_name, const char *domain_name,
char *str, size_t len);
-char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str);
/* The following definitions come from lib/sysacls.c */
@@ -326,11 +325,8 @@ ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt);
ssize_t sys_pread(int fd, void *buf, size_t count, SMB_OFF_T off);
ssize_t sys_pwrite(int fd, const void *buf, size_t count, SMB_OFF_T off);
ssize_t sys_send(int s, const void *msg, size_t len, int flags);
-ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
-ssize_t sys_recv(int fd, void *buf, size_t count, int flags);
ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
int sys_fcntl_ptr(int fd, int cmd, void *arg);
-int sys_fcntl_long(int fd, int cmd, long arg);
void update_stat_ex_mtime(struct stat_ex *dst, struct timespec write_ts);
void update_stat_ex_create_time(struct stat_ex *dst, struct timespec create_time);
int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf,
@@ -343,7 +339,6 @@ int sys_ftruncate(int fd, SMB_OFF_T offset);
int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len);
SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
-int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
SMB_OFF_T sys_ftell(FILE *fp);
int sys_creat(const char *path, mode_t mode);
int sys_open(const char *path, int oflag, mode_t mode);
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 7acb021..08cc03e 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -779,25 +779,6 @@ void standard_sub_advanced(const char *servicename, const char *user,
TALLOC_FREE( s );
}
-/****************************************************************************
- Do some standard substitutions in a string.
-****************************************************************************/
-
-char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str)
-{
- /* Make clear that we require the optional unix_token and unix_info in the source3 code */
- SMB_ASSERT(conn->session_info->unix_token);
- SMB_ASSERT(conn->session_info->unix_info);
- return talloc_sub_advanced(ctx,
- lp_servicename(SNUM(conn)),
- conn->session_info->unix_info->unix_name,
- conn->connectpath,
- conn->session_info->unix_token->gid,
- get_smb_user_name(),
- "",
- str);
-}
-
/******************************************************************************
version of standard_sub_basic() for string lists; uses talloc_sub_basic()
for the work
diff --git a/source3/lib/system.c b/source3/lib/system.c
index a308014..f655853 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -209,42 +209,6 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags)
}
/*******************************************************************
-A sendto wrapper that will deal with EINTR or EAGAIN or EWOULDBLOCK.
-********************************************************************/
-
-ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
-{
- ssize_t ret;
-
- do {
- ret = sendto(s, msg, len, flags, to, tolen);
-#if defined(EWOULDBLOCK)
- } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-#else
- } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
-#endif
- return ret;
-}
-
-/*******************************************************************
-A recv wrapper that will deal with EINTR or EAGAIN or EWOULDBLOCK.
-********************************************************************/
-
-ssize_t sys_recv(int fd, void *buf, size_t count, int flags)
-{
- ssize_t ret;
-
- do {
- ret = recv(fd, buf, count, flags);
-#if defined(EWOULDBLOCK)
- } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-#else
- } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
-#endif
- return ret;
-}
-
-/*******************************************************************
A recvfrom wrapper that will deal with EINTR.
********************************************************************/
@@ -276,20 +240,6 @@ int sys_fcntl_ptr(int fd, int cmd, void *arg)
return ret;
}
-/*******************************************************************
-A fcntl wrapper that will deal with EINTR.
-********************************************************************/
-
-int sys_fcntl_long(int fd, int cmd, long arg)
-{
- int ret;
-
- do {
- ret = fcntl(fd, cmd, arg);
- } while (ret == -1 && errno == EINTR);
- return ret;
-}
-
/****************************************************************************
Get/Set all the possible time fields from a stat struct as a timespec.
****************************************************************************/
@@ -728,23 +678,6 @@ SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence)
}
/*******************************************************************
- An fseek() wrapper that will deal with 64 bit filesizes.
-********************************************************************/
-
-int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence)
-{
-#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEK64)
- return fseek64(fp, offset, whence);
-#elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEKO64)
- return fseeko64(fp, offset, whence);
-#elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEKO)
- return fseeko(fp, offset, whence);
-#else
- return fseek(fp, offset, whence);
-#endif
-}
-
-/*******************************************************************
An ftell() wrapper that will deal with 64 bit filesizes.
********************************************************************/
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index c27685c..7c64569 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -345,60 +345,6 @@ int regval_ctr_numvals(struct regval_ctr *ctr)
return ctr->num_values;
}
-/***********************************************************************
- allocate memory for and duplicate a struct regval_blob.
- This is malloc'd memory so the caller should free it when done
- **********************************************************************/
-
-struct regval_blob* dup_registry_value(struct regval_blob *val)
-{
- struct regval_blob *copy = NULL;
-
- if ( !val )
- return NULL;
-
- if ( !(copy = SMB_MALLOC_P( struct regval_blob)) ) {
- DEBUG(0,("dup_registry_value: malloc() failed!\n"));
- return NULL;
- }
-
- /* copy all the non-pointer initial data */
-
- memcpy( copy, val, sizeof(struct regval_blob) );
-
- copy->size = 0;
- copy->data_p = NULL;
-
- if ( val->data_p && val->size )
- {
- if ( !(copy->data_p = (uint8_t *)memdup( val->data_p,
- val->size )) ) {
- DEBUG(0,("dup_registry_value: memdup() failed for [%d] "
- "bytes!\n", val->size));
- SAFE_FREE( copy );
- return NULL;
- }
- copy->size = val->size;
- }
-
- return copy;
-}
-
-/**********************************************************************
- free the memory allocated to a struct regval_blob
- *********************************************************************/
-
-void free_registry_value(struct regval_blob *val)
-{
- if ( !val )
- return;
-
- SAFE_FREE( val->data_p );
- SAFE_FREE( val );
-
- return;
-}
-
/**********************************************************************
*********************************************************************/
diff --git a/source3/registry/reg_objects.h b/source3/registry/reg_objects.h
index a84bc8a..144e97f 100644
--- a/source3/registry/reg_objects.h
+++ b/source3/registry/reg_objects.h
@@ -47,8 +47,6 @@ int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32_t key_index );
WERROR regval_ctr_init(TALLOC_CTX *mem_ctx, struct regval_ctr **ctr);
int regval_ctr_numvals(struct regval_ctr *ctr);
-struct regval_blob* dup_registry_value(struct regval_blob *val);
-void free_registry_value(struct regval_blob *val);
uint8_t* regval_data_p(struct regval_blob *val);
uint32_t regval_size(struct regval_blob *val);
char* regval_name(struct regval_blob *val);
--
Samba Shared Repository
More information about the samba-cvs
mailing list