~vanhoof/+junk/znc

« back to all changes in this revision

Viewing changes to DCCSock.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-07-24 13:46:00 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090724134600-uaxedj9f92i72ru1
Tags: 0.074-1
* New upstream release.
  - Bump urgency to high. This release fixes an high-impact directory
    traversal buf, where unpriviliged users can save about DCC SEND files on
    the server with the rights of the znc process. The attacker could also
    use the exploit to get a shell on the server.
    Closes: #537977
  - Use c-ares for DNS resolving, add libc-ares-dev and pkg-config as
    build-dependency.
* Merge 0.058-2+lenny2, 0.058-2+lenny3, 0.070-1~bpo40+1 and 0.070-1~bpo50+1
  changelog.
* Bump Standards-Version to 3.8.2 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
class CUser;
16
16
// !Forward Declarations
17
17
 
18
 
class CDCCSock : public Csock {
 
18
class CDCCSock : public CZNCSock {
19
19
public:
20
 
        CDCCSock(CUser* pUser, const CString& sRemoteNick, const CString& sLocalFile, const CString& sModuleName, unsigned long uFileSize = 0, CFile* pFile = NULL) : Csock() {
21
 
                m_sRemoteNick = sRemoteNick;
22
 
                m_uFileSize = uFileSize;
23
 
                m_uRemotePort = 0;
24
 
                m_uBytesSoFar = 0;
25
 
                m_pUser = pUser;
26
 
                m_pFile = pFile;
27
 
                m_sLocalFile = sLocalFile;
28
 
                m_sModuleName = sModuleName;
29
 
                m_bSend = true;
30
 
                m_bNoDelFile = false;
31
 
        }
32
 
 
33
 
        CDCCSock(CUser* pUser, const CString& sRemoteNick, const CString& sRemoteIP, unsigned short uRemotePort, const CString& sLocalFile, unsigned long uFileSize, const CString& sModuleName) : Csock() {
34
 
                m_sRemoteNick = sRemoteNick;
35
 
                m_sRemoteIP = sRemoteIP;
36
 
                m_uRemotePort = uRemotePort;
37
 
                m_uFileSize = uFileSize;
38
 
                m_uBytesSoFar = 0;
39
 
                m_pUser = pUser;
40
 
                m_pFile = NULL;
41
 
                m_sLocalFile = sLocalFile;
42
 
                m_sModuleName = sModuleName;
43
 
                m_bSend = false;
44
 
                m_bNoDelFile = false;
45
 
        }
46
 
 
47
 
/*      CDCCSock(CUser* pUser, const CString& sHostname, unsigned short uPort, int iTimeout = 60) : Csock(sHostname, uPort, iTimeout) {
48
 
                m_uRemotePort = 0;
49
 
                m_uBytesSoFar = 0;
50
 
                m_uFileSize = 0;
51
 
                m_pFile = NULL;
52
 
                m_pUser = pUser;
53
 
                m_bNoDelFile = false;
54
 
        }
55
 
*/
 
20
        CDCCSock(CUser* pUser, const CString& sRemoteNick, const CString& sLocalFile, const CString& sModuleName, unsigned long uFileSize = 0, CFile* pFile = NULL);
 
21
        CDCCSock(CUser* pUser, const CString& sRemoteNick, const CString& sRemoteIP, unsigned short uRemotePort, const CString& sLocalFile, unsigned long uFileSize, const CString& sModuleName);
56
22
        virtual ~CDCCSock();
57
23
 
58
24
        virtual void ReadData(const char* data, int len);