libwbclient: add wbcChangeTrustCredentials.
[ira/wip.git] / nsswitch / winbind_struct_protocol.h
index fe3da817910eb107c6dd8b5d686c4d3801b6e3bc..3056e25905e49bc1a0abb35072e9343a31775a7a 100644 (file)
 #define SAFE_FREE(x) do { if(x) {free(x); x=NULL;} } while(0)
 #endif
 
+#ifndef FSTRING_LEN
+#define FSTRING_LEN 256
+typedef char fstring[FSTRING_LEN];
+#endif
+
 #ifndef _WINBINDD_NTDOM_H
 #define _WINBINDD_NTDOM_H
 
 #define WINBINDD_DONT_ENV    "_NO_WINBINDD"
 #define WINBINDD_LOCATOR_KDC_ADDRESS "WINBINDD_LOCATOR_KDC_ADDRESS"
 
-/* Update this when you change the interface.  */
-
-#define WINBIND_INTERFACE_VERSION 20
+/* Update this when you change the interface.
+ * 21: added WINBINDD_GETPWSID
+ *     added WINBINDD_GETSIDALIASES
+ */
+#define WINBIND_INTERFACE_VERSION 21
 
 /* Have to deal with time_t being 4 or 8 bytes due to structure alignment.
    On a 64bit Linux box, we have to support a constant structure size
@@ -60,6 +67,7 @@ enum winbindd_cmd {
 
        WINBINDD_GETPWNAM,
        WINBINDD_GETPWUID,
+       WINBINDD_GETPWSID,
        WINBINDD_GETGRNAM,
        WINBINDD_GETGRGID,
        WINBINDD_GETGROUPS,
@@ -110,6 +118,7 @@ enum winbindd_cmd {
        /* Miscellaneous other stuff */
 
        WINBINDD_CHECK_MACHACC,     /* Check machine account pw works */
+       WINBINDD_CHANGE_MACHACC,    /* Change machine account pw */
        WINBINDD_PING,              /* Just tell me winbind is running */
        WINBINDD_INFO,              /* Various bit of info.  Currently just tidbits */
        WINBINDD_DOMAIN_NAME,       /* The domain this winbind server is a member of (lp_workgroup()) */
@@ -140,6 +149,9 @@ enum winbindd_cmd {
        /* Various group queries */
        WINBINDD_GETUSERDOMGROUPS,
 
+       /* lookup local groups */
+       WINBINDD_GETSIDALIASES,
+
        /* Initialize connection in a child */
        WINBINDD_INIT_CONNECTION,
 
@@ -158,6 +170,8 @@ enum winbindd_cmd {
        WINBINDD_DUAL_USERINFO,
        WINBINDD_DUAL_GETSIDALIASES,
 
+       WINBINDD_DUAL_NDRCMD,
+
        /* Complete the challenge phase of the NTLM authentication
           protocol using cached password. */
        WINBINDD_CCACHE_NTLMAUTH,
@@ -236,6 +250,7 @@ struct winbindd_request {
                fstring groupname;   /* getgrnam */
                uid_t uid;           /* getpwuid, uid_to_sid */
                gid_t gid;           /* getgrgid, gid_to_sid */
+               uint32_t ndrcmd;
                struct {
                        /* We deliberatedly don't split into domain/user to
                            avoid having the client know what the separator
@@ -484,31 +499,4 @@ struct winbindd_response {
        } extra_data;
 };
 
-struct WINBINDD_MEMORY_CREDS {
-       struct WINBINDD_MEMORY_CREDS *next, *prev;
-       const char *username; /* lookup key. */
-       uid_t uid;
-       int ref_count;
-       size_t len;
-       uint8_t *nt_hash; /* Base pointer for the following 2 */
-       uint8_t *lm_hash;
-       char *pass;
-};
-
-struct WINBINDD_CCACHE_ENTRY {
-       struct WINBINDD_CCACHE_ENTRY *next, *prev;
-       const char *principal_name;
-       const char *ccname;
-       const char *service;
-       const char *username;
-       const char *realm;
-       struct WINBINDD_MEMORY_CREDS *cred_ptr;
-       int ref_count;
-       uid_t uid;
-       time_t create_time;
-       time_t renew_until;
-       time_t refresh_time;
-       struct timed_event *event;
-};
-
 #endif