projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DropPrivs: Move the re-set uid/gid thing to the end of the function
[apt.git]
/
methods
/
ftp.h
diff --git
a/methods/ftp.h
b/methods/ftp.h
index d7f1f7fbece776cb0bfba3febbcf4fbc44da0384..dd92f0086e936043af045211f923ae0eccad9ceb 100644
(file)
--- a/
methods/ftp.h
+++ b/
methods/ftp.h
@@
-3,13
+3,19
@@
// $Id: ftp.h,v 1.4 2001/03/06 07:15:29 jgg Exp $
/* ######################################################################
// $Id: ftp.h,v 1.4 2001/03/06 07:15:29 jgg Exp $
/* ######################################################################
- FTP A
quire Method - This is the FTP a
quire method for APT.
+ FTP A
cquire Method - This is the FTP ac
quire method for APT.
##################################################################### */
/*}}}*/
#ifndef APT_FTP_H
#define APT_FTP_H
##################################################################### */
/*}}}*/
#ifndef APT_FTP_H
#define APT_FTP_H
+#include <apt-pkg/strutl.h>
+
+#include <sys/types.h>
+#include <time.h>
+#include <string>
+
class FTPConn
{
char Buffer[1024*10];
class FTPConn
{
char Buffer[1024*10];
@@
-33,7
+39,7
@@
class FTPConn
socklen_t ServerAddrLen;
// Private helper functions
socklen_t ServerAddrLen;
// Private helper functions
- bool ReadLine(st
ring &Text);
+ bool ReadLine(st
d::string &Text);
bool Login();
bool CreateDataFd();
bool Finalize();
bool Login();
bool CreateDataFd();
bool Finalize();
@@
-43,8
+49,8
@@
class FTPConn
bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; };
// Raw connection IO
bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; };
// Raw connection IO
- bool ReadResp(unsigned int &Ret,string &Text);
- bool WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...);
+ bool ReadResp(unsigned int &Ret,st
d::st
ring &Text);
+ bool WriteMsg(unsigned int &Ret,st
d::st
ring &Text,const char *Fmt,...);
// Connection control
bool Open(pkgAcqMethod *Owner);
// Connection control
bool Open(pkgAcqMethod *Owner);
@@
-53,9
+59,9
@@
class FTPConn
bool ExtGoPasv();
// Query
bool ExtGoPasv();
// Query
- bool Size(const char *Path,unsigned long &Size);
+ bool Size(const char *Path,unsigned long
long
&Size);
bool ModTime(const char *Path, time_t &Time);
bool ModTime(const char *Path, time_t &Time);
- bool Get(const char *Path,FileFd &To,unsigned long Resume,
+ bool Get(const char *Path,FileFd &To,unsigned long
long
Resume,
Hashes &MD5,bool &Missing);
FTPConn(URI Srv);
Hashes &MD5,bool &Missing);
FTPConn(URI Srv);
@@
-65,14
+71,14
@@
class FTPConn
class FtpMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
class FtpMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
- virtual bool Configuration(string Message);
+ virtual bool Configuration(st
d::st
ring Message);
FTPConn *Server;
FTPConn *Server;
- static string FailFile;
+ static st
d::st
ring FailFile;
static int FailFd;
static time_t FailTime;
static int FailFd;
static time_t FailTime;
- static void SigTerm(int);
+ static
APT_NORETURN
void SigTerm(int);
public:
public: