Hello community,
here is the log from the commit of package pure-ftpd for openSUSE:Factory
checked in at Mon May 25 17:24:35 CEST 2009.
--------
--- pure-ftpd/pure-ftpd.changes 2009-01-15 13:03:04.000000000 +0100
+++ /mounts/work_src_done/STABLE/pure-ftpd/pure-ftpd.changes 2009-05-25 14:05:50.000000000 +0200
@@ -1,0 +2,46 @@
+Mon May 25 13:52:55 CEST 2009 - hvogel@suse.de
+
+- Update to version 1.0.22
+ - New catalan translation
+ - TLS support for LDAP
+ - Fix usage of MySQL 5 stored procedures
+ - Compatibility with newer OpenLDAP versions
+ - Don't hang up during uploads if we get any other command than QUIT and
+ ABORT.
+ - SITE UTIME reads UTC time
+ - A space is needed for inline content in response to the MLST command.
+ - Time zone issues should be fixed for good. We have to redefine TZ,
+ tzset() is not enough on Linux when we are in a chroot environment.
+ - Correctly respond to FEAT without removing extra features when passive
+ mode is disabled. Thanks to upb.
+ - Better process name change setup for Linux.
+ - Auto-created home directories are now created with mode 0777 (and
+ directory umask is applied), per common request. It's very important to
+ double check your umask.
+ - Extend gid / uid to 10 digits in ls output. Extend file size as well.
+ - Brazilian portuguese translation was updated.
+ - Fix SecureFX compatibility.
+ - Use PQescapeStringConn() for PostgreSQL instead of hand-made escaping.
+ - Don't respond to server that an upload succeeded before the temporary
+ file has been renamed.
+ - TLS support on data channels
+ - Use sendfile() on recent Solaris versions in place of sendfilev().
+ - Don't use a deprecated interface for Bonjour registration.
+ - Tell authentication handlers if the connection is encrypted or not,
+ through a new AUTHD_ENCRYPTED environment variable.
+ - Create all directories, not only the basement when on-demand directory
+ creation is enabled and the user's home directory looks like /basement/./user.
+ - Fixed error reporting when TLS support was compiled in, but TLS wasn't
+ enabled on the current session
+ - Log full path on file deletion
+ - Handle "ftp" and "anonymous" like normal accounts (with passwords) if -E
+ (no anonymous logins) is specified. Thanks to Arkadiusz Miskiewicz.
+ - Sleep before answering a password failure, not the other way round
+ - In broken mode, show symlinks as their real target. It can have side
+ effects, don't forget that broken mode is... broken mode.
+ - Respect aliasing rules for sockaddr_storage usage.
+ - Privsep is enabled by default in the installation GUI.
+ - --with-everything now includes privsep.
+ - update: fix compilation with gcc 2.x
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
pure-ftpd-1.0.21-ldap_schema.patch
pure-ftpd-1.0.21.tar.bz2
pure-ftpd-1.0.2-default_tcp_sedrcv_buffer_size.patch
New:
----
pure-ftpd-1.0.20-oes_remote_server.patch
pure-ftpd-1.0.22-default_tcp_sedrcv_buffer_size.patch
pure-ftpd-1.0.22.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pure-ftpd.spec ++++++
--- /var/tmp/diff_new_pack.Y14749/_old 2009-05-25 17:24:21.000000000 +0200
+++ /var/tmp/diff_new_pack.Y14749/_new 2009-05-25 17:24:21.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package pure-ftpd (Version 1.0.21)
+# spec file for package pure-ftpd (Version 1.0.22)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,8 +20,8 @@
Name: pure-ftpd
BuildRequires: mysql-devel openldap2-devel pam-devel postgresql-devel
-Version: 1.0.21
-Release: 183
+Version: 1.0.22
+Release: 1
Url: http://www.pureftpd.org
Source: ftp://ftp.pureftpd.org/pub/%{name}/releases/%{name}-%version.tar.bz2
Source1: %{name}.init
@@ -34,9 +34,9 @@
Patch2: %{name}-1.0.20_virtualhosts.patch
Patch4: %{name}-1.0.20_config_minuid.patch
Patch5: %{name}-1.0.20_ftpwho_path.patch
-Patch6: pure-ftpd-1.0.21-ldap_schema.patch
-Patch7: pure-ftpd-1.0.2-default_tcp_sedrcv_buffer_size.patch
+Patch7: pure-ftpd-1.0.22-default_tcp_sedrcv_buffer_size.patch
Patch8: pure-ftpd-1.0.21-portrange.patch
+Patch100: pure-ftpd-1.0.20-oes_remote_server.patch
Group: Productivity/Networking/Ftp/Servers
License: BSD 3-Clause
Provides: ftp-server pureftpd
@@ -64,9 +64,10 @@
%patch2
%patch4
%patch5
-%patch6
%patch7
%patch8
+# uncomment this if you want to have the OES remote_server feature
+# %patch100 -p0
%build
CFLAGS="%{optflags} -DLDAP_DEPRECATED -fstack-protector"
@@ -92,6 +93,7 @@
--with-inetd \
--with-tls \
--with-boring \
+ --with-peruserlimits \
--with-largefile %_target_cpu-suse-linux
%{__make}
cat configuration-file/pure-config.pl |grep -v "^print" | grep -v "^exec" > configuration-file/pure-config-args
@@ -153,6 +155,49 @@
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%name
%changelog
+* Mon May 25 2009 hvogel@suse.de
+- Update to version 1.0.22
+ - New catalan translation
+ - TLS support for LDAP
+ - Fix usage of MySQL 5 stored procedures
+ - Compatibility with newer OpenLDAP versions
+ - Don't hang up during uploads if we get any other command than QUIT and
+ ABORT.
+ - SITE UTIME reads UTC time
+ - A space is needed for inline content in response to the MLST command.
+ - Time zone issues should be fixed for good. We have to redefine TZ,
+ tzset() is not enough on Linux when we are in a chroot environment.
+ - Correctly respond to FEAT without removing extra features when passive
+ mode is disabled. Thanks to upb.
+ - Better process name change setup for Linux.
+ - Auto-created home directories are now created with mode 0777 (and
+ directory umask is applied), per common request. It's very important to
+ double check your umask.
+ - Extend gid / uid to 10 digits in ls output. Extend file size as well.
+ - Brazilian portuguese translation was updated.
+ - Fix SecureFX compatibility.
+ - Use PQescapeStringConn() for PostgreSQL instead of hand-made escaping.
+ - Don't respond to server that an upload succeeded before the temporary
+ file has been renamed.
+ - TLS support on data channels
+ - Use sendfile() on recent Solaris versions in place of sendfilev().
+ - Don't use a deprecated interface for Bonjour registration.
+ - Tell authentication handlers if the connection is encrypted or not,
+ through a new AUTHD_ENCRYPTED environment variable.
+ - Create all directories, not only the basement when on-demand directory
+ creation is enabled and the user's home directory looks like /basement/./user.
+ - Fixed error reporting when TLS support was compiled in, but TLS wasn't
+ enabled on the current session
+ - Log full path on file deletion
+ - Handle "ftp" and "anonymous" like normal accounts (with passwords) if -E
+ (no anonymous logins) is specified. Thanks to Arkadiusz Miskiewicz.
+ - Sleep before answering a password failure, not the other way round
+ - In broken mode, show symlinks as their real target. It can have side
+ effects, don't forget that broken mode is... broken mode.
+ - Respect aliasing rules for sockaddr_storage usage.
+ - Privsep is enabled by default in the installation GUI.
+ - --with-everything now includes privsep.
+ - update: fix compilation with gcc 2.x
* Thu Jan 15 2009 hvogel@suse.de
- Move PassivePortRange to numparic_switch_for [bnc#465954]
* Mon Sep 15 2008 hvogel@suse.de
@@ -244,7 +289,7 @@
o Real disk space is no more shown.
o A possible denial of service when too many users were connected
should be fixed.
-* Tue Mar 02 2004 mmj@suse.de
+* Wed Mar 03 2004 mmj@suse.de
- Reflect in the configuration file that /etc/pure-ftpd/ now is a
place to keep all the pure-ftpd configuration files.
* Tue Mar 02 2004 mmj@suse.de
++++++ pure-ftpd-1.0.20-oes_remote_server.patch ++++++
--- src/ftpd.c 2004-07-17 18:58:22.000000000 +0530
+++ src/ftpd.c 2009-05-07 14:12:45.000000000 +0530
@@ -38,6 +38,20 @@
# include
#endif
+#include
+LDAP* ldapHandle;
+
+
+// remote server navigation constants
+#define MAX_SERVER_SIZE 100
+#define MAX_PATH_SIZE 1000
+const char MOUNT_PATH[] = "/var/opt/novell/nclmnt";
+const int MOUNT_PATH_SIZE = 22;
+
+char userFDN[512];
+static const char *getlocalhostname();
+
+
#ifndef HAVE_SYS_FSUID_H
void disablesignals(void)
{
@@ -1496,6 +1510,9 @@ void dopass(char *password)
/* Clear password from memory, paranoia */
register volatile char *password_ = (volatile char *) password;
+ if(remote_server == 1 )
+ edir_login(account,password,authresult.uid);
+
while (*password_ != 0) {
*password_++ = 0;
}
@@ -1843,6 +1860,31 @@ void docwd(const char *dir)
addreply(550, MSG_SANITY_FILE_FAILURE, where);
return;
}
+
+ char server[MAX_SERVER_SIZE],nss_loc[MAX_PATH_SIZE];
+ if(remote_server ==1 )
+ {
+ // Not allowed to move inside the folder NCPVolForFTP
+ if (strstr(where,"nclmnt") != NULL)
+ goto cd_success;
+
+ getcwd(wd, sizeof wd - (size_t) 1U);
+
+ // cd .. is not allowed from base remote dir
+ if( (wd != NULL) && (strcmp(where,"..") == 0))
+ {
+ if(strncmp(wd,MOUNT_PATH,MOUNT_PATH_SIZE) ==0)
+ {
+ if(strstr(wd+MOUNT_PATH_SIZE+1+strlen(account)+1,"/") == NULL )
+ goto cd_success;
+ }
+ }
+
+ //mount remote server
+ if ( mount_remote_server(where,nss_loc,server) == 0 )
+ where = nss_loc;
+
+ }
if (chdir(where) != 0) {
#ifdef WITH_DIRALIASES
@@ -1886,6 +1928,9 @@ void docwd(const char *dir)
failures = 0UL;
dobanner(1);
#endif
+
+cd_success:
+
if (getcwd(wd, sizeof wd - (size_t) 1U) == NULL) {
if (*dir == '/') {
if (SNCHECK(snprintf(wd, sizeof wd, "%s", dir), sizeof wd)) { /* already checked */
@@ -1899,6 +1944,10 @@ void docwd(const char *dir)
}
}
}
+
+ if(remote_server ==1 )
+ get_remote_server_path(wd);
+
addreply(250, MSG_CURRENT_DIR_IS, wd);
}
@@ -3244,6 +3293,7 @@ void domkd(char *name)
#endif
error(550, MSG_MKD_FAILURE);
} else {
+ get_remote_server_path(name);
addreply(257, "\"%s\" : " MSG_MKD_SUCCESS, name);
}
#ifdef QUOTAS
@@ -4914,6 +4964,11 @@ int main(int argc, char *argv[])
no_ipv4 = 1;
break;
}
+ case '9': {
+ remote_server = 1;
+ break;
+ }
+
case '1': {
log_pid = LOG_PID;
break;
@@ -5560,3 +5615,242 @@ int main(int argc, char *argv[])
return 0;
}
+#include
+#include
+#include
+
+int (*namGetUserFDNfromUID) (int uid, char * userFDN);
+
+static const char *getlocalhostname()
+{
+ static char buf[1025];
+
+ if (gethostname(buf, sizeof buf - 1U) != 0) {
+ return NULL;
+ }
+ return buf;
+}
+
+int edir_login(const char* user,const char* passwd,int uid)
+{
+ int index =0,openCount = 0;
+ char tmp[MAX_PATH_SIZE+100];
+ FILE* fd = NULL;
+ char fdn[512];fdn[0] = '\0' ;
+
+ const char* hostname = getlocalhostname();
+
+ // get the FDN of user from pam_nam.so
+ void * lumHandle = dlopen("/lib64/security/pam_nam.so", RTLD_LAZY);
+ if (lumHandle == NULL)
+ lumHandle = dlopen("/lib/security/pam_nam.so", RTLD_LAZY);
+ if(lumHandle != NULL)
+ {
+ namGetUserFDNfromUID = (int (*)(int, char *))dlsym(lumHandle, "namGetUserFDNfromUID");
+ if(namGetUserFDNfromUID != NULL)
+ {
+ namGetUserFDNfromUID(uid, fdn);
+ } else
+ logfile(LOG_ERR,"Function namGetUserFDNfromUID not found");
+ dlclose(lumHandle);
+ } else
+ logfile(LOG_ERR,"PAM library not found");
+
+ //copy user name provided by the ftp client incase pam_nam.so does not provide FDN of user
+ if (fdn[0] == '\0')
+ strncpy(fdn,user,sizeof(fdn));
+
+ //Convert . separared user FDN to ldap formated(, separated) user FDN
+ while (fdn[index] != '\0')
+ {
+ if(fdn[index] != ',')
+ userFDN[index] = fdn[index];
+ else
+ userFDN[index] = '.';
+ ++index;
+ }
+ userFDN[index] = '\0';
+
+ /*
+ do nwlogin the local server.Same nw connection is reused for connecting to different machine.
+ */
+ snprintf(tmp,sizeof(tmp),"sudo -u %s nwlogin -s %s -u %s -p %s -c x > /dev/null",user,hostname,userFDN,passwd );
+ system(tmp);
+
+ //create directories to store no of simultaneous logins by same user
+ mkdir("/var/opt/novell/pure-ftpd/",0777);
+ snprintf(tmp,sizeof(tmp),"/var/opt/novell/pure-ftpd/%s",account);
+ mkdir(tmp, 0777);
+
+ snprintf(tmp,sizeof(tmp),"/var/opt/novell/pure-ftpd/%s/count.txt",account);
+ fd = fopen(tmp,"r+");
+
+ openCount = 1;
+ if(fd != NULL)
+ {
+ if(fread(&openCount,sizeof(int),1,fd) > 0)
+ {
+ if(openCount >= 0)
+ ++openCount;
+ else
+ openCount = 1;
+ } else
+ openCount = 1;
+ fclose(fd);
+ } else
+ openCount = 1;
+ sprintf(tmp,"/var/opt/novell/pure-ftpd/%s/count.txt",account);
+ fd = fopen(tmp,"w+");
+ if(fd != NULL)
+ {
+ fwrite(&openCount,sizeof(int),1,fd);
+ fclose(fd);
+ }
+
+ ldapHandle = ldap_init("127.0.0.1", 389);
+ if (ldapHandle == NULL)
+ {
+ logfile(LOG_ERR, "ldap init failed");
+ return 0;
+ }
+ ldap_simple_bind(ldapHandle,fdn,passwd);
+
+
+
+ return 0;
+}
+
+int mount_remote_server(const char* where,char* nss_loc,char* remote_server)
+{
+ char tmp[MAX_PATH_SIZE+100],path[MAX_PATH_SIZE];
+ char* str1,*server;
+ int err;
+ struct hostent *he;
+ struct in_addr ipv4addr;
+
+ if((where != NULL ) &&(strncmp(where,"//",2 ) ==0))
+ {
+ //Get the remote oes server path excluding server name
+ snprintf(path,sizeof(path),index(where+2, '/'));
+
+ //Get the server name from remote oes path
+ str1 = (char*) where+2;
+ server = strtok(str1,"/");
+
+ /*
+ * nwlogin as logged in ftp user.
+ * nwlogin does not require password here. novell client reuses exising connection
+ */
+ sprintf(tmp,"sudo -u %s nwlogin -s %s -u %s -p x -c x > /dev/null",account,server,userFDN);
+ err= system(tmp);
+
+ if(err !=0 )
+ {
+ snprintf(tmp,sizeof(tmp),"Novell Client Login Failed with error %d ",err);
+ logfile(LOG_ERR,tmp);
+ return -1;
+ }
+
+ /*
+ nwlogin mounts the remote server to dir with name "hostname"
+ ip address is converted to hostname
+ */
+
+ if(inet_pton(AF_INET, server, &ipv4addr) > 0)
+ {
+ he = gethostbyaddr(&ipv4addr, sizeof ipv4addr, AF_INET);
+ if(he != NULL)
+ server = strtok(he->h_name,".");
+ }
+
+ if(nss_loc != NULL)
+ snprintf(nss_loc,MAX_PATH_SIZE,"%s/%s/%s/%s",MOUNT_PATH,account,server,path);
+ if(remote_server != NULL )
+ strncpy(remote_server,server, MAX_SERVER_SIZE);
+
+ return 0;
+ } else
+ return -1;
+}
+
+
+int umount_remote_server()
+{
+ char tmp[MAX_PATH_SIZE+100];
+ int openCount = 0;
+ FILE* fd = NULL;
+
+ snprintf(tmp,sizeof(tmp),"/var/opt/novell/pure-ftpd/%s/count.txt",account);
+ fd = fopen(tmp,"r+");
+ if(fd != NULL)
+ {
+ if(fread(&openCount,sizeof(int),1,fd) > 0)
+ {
+ if (openCount > 0 )
+ --openCount;
+ else
+ openCount = 0;
+ } else
+ openCount = 0;
+
+ fclose(fd);
+
+ fd = fopen(tmp,"w+");
+ fwrite(&openCount,sizeof(int),1,fd);
+ fclose(fd);
+ } else
+ logfile(LOG_ERR,"File Open failed");
+
+ //nwlogout is not called when same ftp user is logged in more than once
+ if(openCount <= 0)
+ {
+ snprintf(tmp,sizeof(tmp),"sudo -u %s nwlogout -f -a > /dev/null",account);
+ system(tmp);
+ }
+ return 0;
+}
+
+int get_remote_server_path(char* path)
+{
+ char tmp[MAX_PATH_SIZE];
+
+ if (path == NULL)
+ return -1;
+
+ // Send the remote dir location as reply
+ if( strncmp(path,MOUNT_PATH,MOUNT_PATH_SIZE) == 0)
+ {
+ snprintf(tmp,sizeof(tmp),"//%s",path+MOUNT_PATH_SIZE+1+strlen(account)+1);
+ strncpy(path,tmp,MAX_PATH_SIZE);
+ }
+ return 0;
+}
+int do_list_servers()
+{
+ //create server list
+ char* attrs[]={"cn",NULL};
+ char* ldapDN;
+ LDAPMessage* entry = NULL;
+ LDAPMessage* searchResult = NULL;
+
+ if (ldapHandle == NULL)
+ {
+ logfile(LOG_ERR, "LDAP connection failed ");
+ return -1;
+ }
+ int rc = ldap_search_ext_s(ldapHandle,"",LDAP_SCOPE_SUBTREE,"(&(objectclass=NCP Server))",
+ attrs, 0,NULL, NULL, 0, LDAP_NO_LIMIT, &searchResult);
+
+ if(rc == LDAP_SUCCESS )
+ {
+ for(entry = ldap_first_entry(ldapHandle,searchResult) ; entry != NULL ;
+ entry = ldap_next_entry(ldapHandle,entry))
+ {
+ if(ldapDN = ldap_get_dn(ldapHandle,entry))
+ addreply_noformat(0, ldapDN);
+ }
+ } else
+ addreply_noformat(0, "");
+ return 0;
+}
+
--- src/ftpd_p.h 2004-03-01 03:19:28.000000000 +0530
+++ src/ftpd_p.h 2009-05-05 10:57:16.000000000 +0530
@@ -61,6 +61,7 @@ struct reply {
static const char *GETOPT_OPTIONS =
"0146Aa:bc:"
+ "9"
#ifndef NO_STANDALONE
"BC:"
#endif
@@ -110,6 +111,7 @@ static struct option long_options[] = {
{ "logpid", 0, NULL, '1' },
{ "ipv4only", 0, NULL, '4' },
{ "ipv6only", 0, NULL, '6' },
+ { "remoteserver", 0, NULL, '9' },
{ "chrooteveryone", 0, NULL, 'A' },
{ "trustedgid", 1, NULL, 'a' },
{ "brokenclientscompatibility", 0, NULL, 'b' },
--- src/ftp_parser.c 2004-06-06 16:10:28.000000000 +0530
+++ src/ftp_parser.c 2009-05-05 10:57:17.000000000 +0530
@@ -16,6 +16,8 @@
# include
#endif
+#define MAX_PATH_SIZE 1000
+
static void antiidle(void)
{
if (noopidle == (time_t) -1) {
@@ -294,6 +296,8 @@ void parser(void)
}
dopass(arg);
} else if (!strcmp(cmd, "quit")) {
+ if(remote_server == 1)
+ umount_remote_server();
addreply(221, MSG_GOODBYE,
(unsigned long long) ((uploaded + 1023ULL) / 1024ULL),
(unsigned long long) ((downloaded + 1023ULL) / 1024ULL));
@@ -407,6 +411,10 @@ void parser(void)
} else if (!strcmp(cmd, "cdup") || !strcmp(cmd, "xcup")) {
docwd("..");
} else if (!strcmp(cmd, "retr")) {
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ( (remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
if (*arg != 0) {
doretr(arg);
} else {
@@ -422,12 +430,20 @@ void parser(void)
}
goto wayout;
} else if (!strcmp(cmd, "dele")) {
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ( (remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
if (*arg != 0) {
dodele(arg);
} else {
addreply_noformat(501, MSG_NO_FILE_NAME);
}
} else if (!strcmp(cmd, "stor")) {
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ( (remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
arg = revealextraspc(arg);
if (*arg != 0) {
dostor(arg, 0, autorename);
@@ -435,6 +451,10 @@ void parser(void)
addreply_noformat(501, MSG_NO_FILE_NAME);
}
} else if (!strcmp(cmd, "appe")) {
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ((remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
arg = revealextraspc(arg);
if (*arg != 0) {
dostor(arg, 1, 0);
@@ -447,6 +467,10 @@ void parser(void)
#endif
#ifndef DISABLE_MKD_RMD
} else if (!strcmp(cmd, "mkd") || !strcmp(cmd, "xmkd")) {
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ((remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
arg = revealextraspc(arg);
if (*arg != 0) {
domkd(arg);
@@ -454,6 +478,10 @@ void parser(void)
addreply_noformat(501, MSG_NO_DIRECTORY_NAME);
}
} else if (!strcmp(cmd, "rmd") || !strcmp(cmd, "xrmd")) {
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ( (remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
if (*arg != 0) {
dormd(arg);
} else {
@@ -575,6 +603,8 @@ void parser(void)
}
}
# endif
+ } else if (!strcasecmp(arg, "slist")) {
+ do_list_servers();
} else if (*arg != 0) {
addreply(500, "SITE %s " MSG_UNKNOWN_EXTENSION, arg);
} else {
--- src/globals.h 2004-03-01 03:19:28.000000000 +0530
+++ src/globals.h 2009-05-05 10:57:19.000000000 +0530
@@ -29,6 +29,7 @@ GLOBAL(int datafd, -1);
GLOBAL0(struct sockaddr_storage ctrlconn); /* stdin/stdout, for using the same ip number */
GLOBAL0(signed char v6ready); /* IPv6 supported or not */
GLOBAL0(signed char no_ipv4); /* IPv4 disabled or not */
+GLOBAL0(signed char remote_server); /* OES remote server supported or not*/
GLOBAL(const size_t cmdsize, MAXPATHLEN + 16U);
GLOBAL0(char cmd[MAXPATHLEN + 32U]); /* command line - about 30 chars for command */
GLOBAL0(char wd[MAXPATHLEN + 1U]); /* current working directory */
--- src/ls.c 2004-03-01 03:19:27.000000000 +0530
+++ src/ls.c 2009-05-05 10:57:16.000000000 +0530
@@ -12,6 +12,8 @@
# include
#endif
+#define MAX_PATH_SIZE 1000
+
static void wrstr(const int f, const char *s)
{
static char outbuf[CONF_TCP_SO_SNDBUF];
@@ -171,6 +173,7 @@ static void addfile(const char *name, co
if (!name || !suffix) {
return;
}
+
if (matches >= max_ls_files) {
return;
}
@@ -332,6 +335,11 @@ static int listfile(const PureFileInfo *
if ((alloca_nameline = ALLOCA(sizeof_nameline)) == NULL) {
return 0;
}
+ char remote_file_name[MAX_PATH_SIZE];
+ strncpy(remote_file_name,name,MAX_PATH_SIZE);
+ if(remote_server == 1)
+ get_remote_server_path(remote_file_name);
+
#ifdef WITH_LARGE_FILES
if (SNCHECK(snprintf(alloca_nameline, sizeof_nameline,
"%s %4d %s %s %8llu %s %2d %s %s",
@@ -339,7 +347,7 @@ static int listfile(const PureFileInfo *
getgroup(st.st_gid),
(unsigned long long) st.st_size,
months[t->tm_mon],
- t->tm_mday, timeline, name),
+ t->tm_mday, timeline, remote_file_name),
sizeof_nameline))
#else
if (SNCHECK(snprintf(alloca_nameline, sizeof_nameline,
@@ -348,7 +356,7 @@ static int listfile(const PureFileInfo *
getgroup(st.st_gid),
(unsigned long) st.st_size,
months[t->tm_mon],
- t->tm_mday, timeline, name),
+ t->tm_mday, timeline, remote_file_name),
sizeof_nameline))
#endif
{
@@ -796,6 +804,11 @@ void donlist(char *arg, const int on_ctr
justone = 1; /* just one argument, so don't print dir name */
+ // support full remote server path
+ char nss_loc[MAX_PATH_SIZE];
+ if ( (remote_server == 1) && (mount_remote_server(arg,nss_loc,NULL) ==0))
+ arg = nss_loc;
+
do {
glob_t g;
int a;
++++++ pure-ftpd-1.0.2-default_tcp_sedrcv_buffer_size.patch -> pure-ftpd-1.0.22-default_tcp_sedrcv_buffer_size.patch ++++++
--- pure-ftpd/pure-ftpd-1.0.2-default_tcp_sedrcv_buffer_size.patch 2008-07-25 12:54:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/pure-ftpd/pure-ftpd-1.0.22-default_tcp_sedrcv_buffer_size.patch 2009-05-25 14:06:06.000000000 +0200
@@ -1,11 +1,11 @@
--- configure
+++ configure
-@@ -21772,141 +21772,13 @@
- echo "${ECHO_T}no" >&6
+@@ -24608,169 +24608,13 @@
+ $as_echo "no" >&6; }
fi
--echo "$as_me:$LINENO: checking default TCP send buffer size" >&5
--echo $ECHO_N "checking default TCP send buffer size... $ECHO_C" >&6
+-{ $as_echo "$as_me:$LINENO: checking default TCP send buffer size" >&5
+-$as_echo_n "checking default TCP send buffer size... " >&6; }
-if test "$cross_compiling" = yes; then
- CONF_TCP_SO_SNDBUF=65536
-else
@@ -43,29 +43,43 @@
-
-_ACEOF
-rm -f conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+- (eval "$ac_link") 2>&5
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-- (eval $ac_try) 2>&5
+- { (case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+- (eval "$ac_try") 2>&5
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- CONF_TCP_SO_SNDBUF=`cat conftestval`
-else
-- echo "$as_me: program exited with status $ac_status" >&5
--echo "$as_me: failed program was:" >&5
+- $as_echo "$as_me: program exited with status $ac_status" >&5
+-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-CONF_TCP_SO_SNDBUF=65536
-fi
--rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-rm -rf conftest.dSYM
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
--echo "$as_me:$LINENO: result: $CONF_TCP_SO_SNDBUF" >&5
--echo "${ECHO_T}$CONF_TCP_SO_SNDBUF" >&6
+-
+-
+-{ $as_echo "$as_me:$LINENO: result: $CONF_TCP_SO_SNDBUF" >&5
+-$as_echo "$CONF_TCP_SO_SNDBUF" >&6; }
-
-
cat >>confdefs.h <<_ACEOF
@@ -74,8 +88,8 @@
_ACEOF
--echo "$as_me:$LINENO: checking default TCP receive buffer size" >&5
--echo $ECHO_N "checking default TCP receive buffer size... $ECHO_C" >&6
+-{ $as_echo "$as_me:$LINENO: checking default TCP receive buffer size" >&5
+-$as_echo_n "checking default TCP receive buffer size... " >&6; }
-if test "$cross_compiling" = yes; then
- CONF_TCP_SO_RCVBUF=65536
-else
@@ -113,29 +127,43 @@
-
-_ACEOF
-rm -f conftest$ac_exeext
--if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-- (eval $ac_link) 2>&5
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+- (eval "$ac_link") 2>&5
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-- (eval $ac_try) 2>&5
+- { (case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+- (eval "$ac_try") 2>&5
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- CONF_TCP_SO_RCVBUF=`cat conftestval`
-else
-- echo "$as_me: program exited with status $ac_status" >&5
--echo "$as_me: failed program was:" >&5
+- $as_echo "$as_me: program exited with status $ac_status" >&5
+-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-CONF_TCP_SO_RCVBUF=65536
-fi
--rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-rm -rf conftest.dSYM
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
--echo "$as_me:$LINENO: result: $CONF_TCP_SO_RCVBUF" >&5
--echo "${ECHO_T}$CONF_TCP_SO_RCVBUF" >&6
+-
+-
+-{ $as_echo "$as_me:$LINENO: result: $CONF_TCP_SO_RCVBUF" >&5
+-$as_echo "$CONF_TCP_SO_RCVBUF" >&6; }
-
-
cat >>confdefs.h <<_ACEOF
++++++ pure-ftpd-1.0.21.tar.bz2 -> pure-ftpd-1.0.22.tar.bz2 ++++++
++++ 58861 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org