Revert "Fix bug 8196 - Many (newer) header files don't have copyright / GPL header...
[ddiss/samba.git] / source3 / libads / ldap_schema.h
1 /* used to remember the names of the posix attributes in AD */
2 /* see the rfc2307 & sfu nss backends */
3
4 struct posix_schema {
5         char *posix_homedir_attr;
6         char *posix_shell_attr;
7         char *posix_uidnumber_attr;
8         char *posix_gidnumber_attr;
9         char *posix_gecos_attr;
10         char *posix_uid_attr;
11 };
12
13 /* ldap attribute oids (Services for Unix 3.0, 3.5) */
14 #define ADS_ATTR_SFU_UIDNUMBER_OID      "1.2.840.113556.1.6.18.1.310"
15 #define ADS_ATTR_SFU_GIDNUMBER_OID      "1.2.840.113556.1.6.18.1.311"
16 #define ADS_ATTR_SFU_HOMEDIR_OID        "1.2.840.113556.1.6.18.1.344"
17 #define ADS_ATTR_SFU_SHELL_OID          "1.2.840.113556.1.6.18.1.312"
18 #define ADS_ATTR_SFU_GECOS_OID          "1.2.840.113556.1.6.18.1.337"
19 #define ADS_ATTR_SFU_UID_OID            "1.2.840.113556.1.6.18.1.309"
20
21 /* ldap attribute oids (Services for Unix 2.0) */
22 #define ADS_ATTR_SFU20_UIDNUMBER_OID    "1.2.840.113556.1.4.7000.187.70"
23 #define ADS_ATTR_SFU20_GIDNUMBER_OID    "1.2.840.113556.1.4.7000.187.71"
24 #define ADS_ATTR_SFU20_HOMEDIR_OID      "1.2.840.113556.1.4.7000.187.106"
25 #define ADS_ATTR_SFU20_SHELL_OID        "1.2.840.113556.1.4.7000.187.72"
26 #define ADS_ATTR_SFU20_GECOS_OID        "1.2.840.113556.1.4.7000.187.97"
27 #define ADS_ATTR_SFU20_UID_OID          "1.2.840.113556.1.4.7000.187.102"
28
29
30 /* ldap attribute oids (RFC2307) */
31 #define ADS_ATTR_RFC2307_UIDNUMBER_OID  "1.3.6.1.1.1.1.0"
32 #define ADS_ATTR_RFC2307_GIDNUMBER_OID  "1.3.6.1.1.1.1.1"
33 #define ADS_ATTR_RFC2307_HOMEDIR_OID    "1.3.6.1.1.1.1.3"
34 #define ADS_ATTR_RFC2307_SHELL_OID      "1.3.6.1.1.1.1.4"
35 #define ADS_ATTR_RFC2307_GECOS_OID      "1.3.6.1.1.1.1.2"
36 #define ADS_ATTR_RFC2307_UID_OID        "0.9.2342.19200300.100.1.1"
37
38 enum wb_posix_mapping {
39         WB_POSIX_MAP_UNKNOWN    = -1,
40         WB_POSIX_MAP_TEMPLATE   = 0,
41         WB_POSIX_MAP_SFU        = 1,
42         WB_POSIX_MAP_SFU20      = 2,
43         WB_POSIX_MAP_RFC2307    = 3,
44         WB_POSIX_MAP_UNIXINFO   = 4
45 };
46
47 /* The following definitions come from libads/ldap_schema.c  */
48
49 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads,
50                                      const char *schema_path,
51                                      TALLOC_CTX *mem_ctx,
52                                      const struct GUID *schema_guid);
53 ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_path);
54 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
55                                           ADS_STRUCT *ads,
56                                           enum wb_posix_mapping map_type,
57                                           struct posix_schema **s ) ;