~ubuntu-branches/ubuntu/hardy/openldap2.3/hardy-updates

« back to all changes in this revision

Viewing changes to contrib/ldapc++/src/LDAPAttrType.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2008-07-31 16:06:53 UTC
  • mfrom: (16.1.3 hardy-proposed)
  • Revision ID: james.westby@ubuntu.com-20080731160653-np1dr19qfutmqb0v
Tags: 2.4.9-0ubuntu0.8.04.1
* SECURITY UPDATE: denial of service via broken BER decoding.
* Added debian/patches/security-ber-decoding.patch: upstream fixes.
* References
  CVE-2008-2952

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPAttrType.h,v 1.3.4.3 2008/05/01 21:28:42 quanah Exp $
1
2
/*
2
3
 * Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
3
4
 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
22
23
class LDAPAttrType{
23
24
    private :
24
25
        StringList names;
25
 
        string desc, oid;
 
26
        std::string desc, oid, superiorOid, equalityOid;
 
27
        std::string orderingOid, substringOid, syntaxOid;
26
28
        bool single;
27
29
        int usage;
28
 
        
 
30
 
29
31
    public :
30
32
 
31
33
        /**
34
36
        LDAPAttrType();
35
37
 
36
38
        /**
37
 
         * Copy constructor
38
 
         */   
39
 
        LDAPAttrType (const LDAPAttrType& oc);
40
 
 
41
 
        /**
42
39
         * Constructs new object and fills the data structure by parsing the
43
40
         * argument.
44
41
         * @param at_item description of attribute type is string returned
57
54
        /**
58
55
         * Returns attribute description
59
56
         */
60
 
        string getDesc ();
 
57
        string getDesc() const;
61
58
        
62
59
        /**
63
60
         * Returns attribute oid
64
61
         */
65
 
        string getOid ();
 
62
        string getOid() const;
66
63
 
67
64
        /**
68
65
         * Returns attribute name (first one if there are more of them)
69
66
         */
70
 
        string getName ();
 
67
        string getName() const;
71
68
 
72
69
        /**
73
70
         * Returns all attribute names
74
71
         */
75
 
        StringList getNames();
 
72
        StringList getNames() const;
76
73
        
77
74
        /**
78
75
         * Returns true if attribute type allows only single value
79
76
         */
80
 
        bool isSingle();
 
77
        bool isSingle() const;
81
78
        
82
79
        /**
83
80
         * Return the 'usage' value:
84
81
         * (0=userApplications, 1=directoryOperation, 2=distributedOperation, 
85
82
         *  3=dSAOperation)
86
83
         */
87
 
        int getUsage ();
 
84
        int getUsage () const;
 
85
        std::string getSuperiorOid() const;
 
86
        std::string getEqualityOid() const;
 
87
        std::string getOrderingOid() const;
 
88
        std::string getSubstringOid() const;
 
89
        std::string getSyntaxOid() const;
88
90
 
89
 
        void setNames (char **at_names);
90
 
        void setDesc (char *at_desc);
91
 
        void setOid (char *at_oid);
92
 
        void setSingle (int at_single_value);
93
 
        void setUsage (int at_usage );
 
91
        void setNames( char **at_names);
 
92
        void setDesc(const char *at_desc);
 
93
        void setOid(const char *at_oid);
 
94
        void setSingle(int at_single_value);
 
95
        void setUsage(int at_usage );
 
96
        void setSuperiorOid( const char *oid );
 
97
        void setEqualityOid( const char *oid );
 
98
        void setOrderingOid( const char *oid );
 
99
        void setSubstringOid( const char *oid );
 
100
        void setSyntaxOid( const char *oid );
94
101
};
95
102
 
96
103
#endif // LDAP_ATTRTYPE_H