2008-12-16 11:30:16 +03:00
/*
2002-01-30 09:08:46 +03:00
Unix SMB / CIFS implementation .
2000-05-09 15:43:00 +04:00
Winbind daemon for ntdom nss module
Copyright ( C ) Tim Potter 2000
2006-07-19 00:19:55 +04:00
Copyright ( C ) Gerald Carter 2006
2008-12-16 11:30:16 +03:00
2004-12-18 01:16:30 +03:00
You are free to use this interface definition in any way you see
fit , including without restriction , using this header in your own
2008-12-16 11:30:16 +03:00
products . You do not need to give any attribution .
2000-05-09 15:43:00 +04:00
*/
2001-09-17 08:52:45 +04:00
# ifndef SAFE_FREE
2005-05-31 17:46:45 +04:00
# define SAFE_FREE(x) do { if(x) {free(x); x=NULL;} } while(0)
2001-09-17 08:52:45 +04:00
# endif
2009-04-16 16:53:36 +04:00
# ifndef FSTRING_LEN
# define FSTRING_LEN 256
typedef char fstring [ FSTRING_LEN ] ;
# endif
2000-05-09 15:43:00 +04:00
# ifndef _WINBINDD_NTDOM_H
# define _WINBINDD_NTDOM_H
# define WINBINDD_SOCKET_NAME "pipe" /* Name of PF_UNIX socket */
2007-04-21 01:09:44 +04:00
2014-02-19 02:39:46 +04:00
/* We let the build environment set the public winbindd socket
* location . Therefore we no longer set
*
* # define WINBINDD_SOCKET_DIR " /tmp/.winbindd "
*
* A number of different distributions set different paths , and so it
* needs to come from configure in Samba . External users of this header will
* need to know where the path is on their system by some other
* mechanism .
2007-04-21 01:09:44 +04:00
*/
2014-02-03 06:46:08 +04:00
# define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lock_directory() to hold the 'privileged' pipe */
2000-06-14 13:58:12 +04:00
# define WINBINDD_DOMAIN_ENV "WINBINDD_DOMAIN" /* Environment variables */
# define WINBINDD_DONT_ENV "_NO_WINBINDD"
2007-08-30 20:24:51 +04:00
# define WINBINDD_LOCATOR_KDC_ADDRESS "WINBINDD_LOCATOR_KDC_ADDRESS"
2000-05-09 15:43:00 +04:00
2009-02-10 22:06:44 +03:00
/* Update this when you change the interface.
* 21 : added WINBINDD_GETPWSID
* added WINBINDD_GETSIDALIASES
2009-12-21 23:50:43 +03:00
* 22 : added WINBINDD_PING_DC
2010-01-24 18:41:30 +03:00
* 23 : added session_key to ccache_ntlm_auth response
* added WINBINDD_CCACHE_SAVE
2010-04-03 16:16:19 +04:00
* 24 : Fill in num_entries WINBINDD_LIST_USERS and WINBINDD_LIST_GROUPS
2009-01-22 20:05:20 +03:00
* 25 : removed WINBINDD_SET_HWM
* removed WINBINDD_SET_MAPPING
* removed WINBINDD_REMOVE_MAPPING
2011-01-10 19:25:00 +03:00
* 26 : added WINBINDD_DC_INFO
2011-03-08 16:31:44 +03:00
* 27 : added WINBINDD_LOOKUPSIDS
2015-08-14 18:15:33 +03:00
* 28 : added WINBINDD_XIDS_TO_SIDS
2016-02-09 10:02:22 +03:00
* removed WINBINDD_SID_TO_UID
2016-02-09 10:02:22 +03:00
* removed WINBINDD_SID_TO_GID
2016-02-09 11:36:37 +03:00
* removed WINBINDD_GID_TO_SID
2016-02-09 11:36:37 +03:00
* removed WINBINDD_UID_TO_SID
2017-01-29 19:46:12 +03:00
* 29 : added " authoritative " to response . data . auth
2018-01-10 12:20:46 +03:00
* 30 : added " validation_level " and " info6 " to response . data . auth
2018-11-02 20:39:26 +03:00
* 31 : added " client_name " to the request
2021-09-05 21:37:55 +03:00
* 32 : added " traceid " to the request
2022-02-28 19:16:23 +03:00
* removed WINBINDD_INIT_CONNECTION
2009-02-10 22:06:44 +03:00
*/
2021-09-05 21:37:55 +03:00
# define WINBIND_INTERFACE_VERSION 32
2002-01-11 02:45:29 +03:00
2006-07-19 00:19:55 +04:00
/* Have to deal with time_t being 4 or 8 bytes due to structure alignment.
On a 64 bit Linux box , we have to support a constant structure size
2010-03-13 14:47:28 +03:00
between / lib / libnss_winbind . so .2 and / lib64 / libnss_winbind . so .2 .
2006-07-19 00:19:55 +04:00
The easiest way to do this is to always use 8 byte values for time_t . */
2007-09-13 18:14:02 +04:00
# define SMB_TIME_T int64_t
2006-07-19 00:19:55 +04:00
2002-01-11 02:45:29 +03:00
/* Socket commands */
2002-01-10 14:28:14 +03:00
2000-05-09 15:43:00 +04:00
enum winbindd_cmd {
2000-06-14 13:58:12 +04:00
2002-01-11 02:45:29 +03:00
WINBINDD_INTERFACE_VERSION , /* Always a well known value */
2000-06-14 13:58:12 +04:00
/* Get users and groups */
2002-01-10 09:20:03 +03:00
WINBINDD_GETPWNAM ,
WINBINDD_GETPWUID ,
2009-02-10 22:06:44 +03:00
WINBINDD_GETPWSID ,
2002-01-10 09:20:03 +03:00
WINBINDD_GETGRNAM ,
WINBINDD_GETGRGID ,
2000-10-11 09:45:06 +04:00
WINBINDD_GETGROUPS ,
2000-06-14 13:58:12 +04:00
/* Enumerate users and groups */
WINBINDD_SETPWENT ,
WINBINDD_ENDPWENT ,
WINBINDD_GETPWENT ,
WINBINDD_SETGRENT ,
WINBINDD_ENDGRENT ,
WINBINDD_GETGRENT ,
/* PAM authenticate and password change */
WINBINDD_PAM_AUTH ,
2001-11-14 23:02:02 +03:00
WINBINDD_PAM_AUTH_CRAP ,
2000-06-14 13:58:12 +04:00
WINBINDD_PAM_CHAUTHTOK ,
2006-02-04 01:19:41 +03:00
WINBINDD_PAM_LOGOFF ,
2006-07-13 13:29:25 +04:00
WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP ,
2000-06-14 13:58:12 +04:00
/* List various things */
2001-11-14 23:02:02 +03:00
WINBINDD_LIST_USERS , /* List w/o rid->id mapping */
WINBINDD_LIST_GROUPS , /* Ditto */
2000-06-14 13:58:12 +04:00
WINBINDD_LIST_TRUSTDOM ,
/* SID conversion */
WINBINDD_LOOKUPSID ,
WINBINDD_LOOKUPNAME ,
2006-07-11 22:01:26 +04:00
WINBINDD_LOOKUPRIDS ,
2011-03-08 16:31:44 +03:00
WINBINDD_LOOKUPSIDS ,
2000-06-14 13:58:12 +04:00
2001-11-14 23:02:02 +03:00
/* Lookup functions */
2000-06-14 13:58:12 +04:00
2006-12-12 17:52:13 +03:00
WINBINDD_SIDS_TO_XIDS ,
2015-08-14 18:15:33 +03:00
WINBINDD_XIDS_TO_SIDS ,
2006-02-04 01:19:41 +03:00
WINBINDD_ALLOCATE_UID ,
WINBINDD_ALLOCATE_GID ,
2000-06-14 13:58:12 +04:00
/* Miscellaneous other stuff */
WINBINDD_CHECK_MACHACC , /* Check machine account pw works */
2009-10-06 20:15:08 +04:00
WINBINDD_CHANGE_MACHACC , /* Change machine account pw */
2009-12-21 23:50:43 +03:00
WINBINDD_PING_DC , /* Ping the DC through NETLOGON */
2002-01-10 13:23:54 +03:00
WINBINDD_PING , /* Just tell me winbind is running */
2002-01-10 14:28:14 +03:00
WINBINDD_INFO , /* Various bit of info. Currently just tidbits */
2002-01-26 12:55:38 +03:00
WINBINDD_DOMAIN_NAME , /* The domain this winbind server is a member of (lp_workgroup()) */
2000-06-14 13:58:12 +04:00
2004-01-04 14:51:31 +03:00
WINBINDD_DOMAIN_INFO , /* Most of what we know from
struct winbindd_domain */
2005-06-09 02:10:34 +04:00
WINBINDD_GETDCNAME , /* Issue a GetDCName Request */
2007-08-28 19:20:54 +04:00
WINBINDD_DSGETDCNAME , /* Issue a DsGetDCName Request */
2011-01-10 19:25:00 +03:00
WINBINDD_DC_INFO , /* Which DC are we connected to? */
2004-01-04 14:51:31 +03:00
2002-01-31 14:49:29 +03:00
WINBINDD_SHOW_SEQUENCE , /* display sequence numbers of domains */
2002-03-29 18:37:39 +03:00
/* WINS commands */
WINBINDD_WINS_BYIP ,
WINBINDD_WINS_BYNAME ,
2002-07-15 14:35:28 +04:00
/* this is like GETGRENT but gives an empty group list */
WINBINDD_GETGRLST ,
2003-01-28 15:07:02 +03:00
WINBINDD_NETBIOS_NAME , /* The netbios name of the server */
2000-06-14 13:58:12 +04:00
2003-04-07 11:32:51 +04:00
/* find the location of our privileged pipe */
2003-03-24 12:54:13 +03:00
WINBINDD_PRIV_PIPE_DIR ,
2003-11-19 11:11:14 +03:00
/* return a list of group sids for a user sid */
2005-06-09 02:10:34 +04:00
WINBINDD_GETUSERSIDS ,
2006-02-04 01:19:41 +03:00
/* Various group queries */
2005-06-09 02:10:34 +04:00
WINBINDD_GETUSERDOMGROUPS ,
2009-02-11 00:59:10 +03:00
/* lookup local groups */
WINBINDD_GETSIDALIASES ,
2005-06-09 02:10:34 +04:00
/* Blocking calls that are not allowed on the main winbind pipe, only
* between parent and children */
WINBINDD_DUAL_SID2UID ,
WINBINDD_DUAL_SID2GID ,
2006-12-12 17:52:13 +03:00
WINBINDD_DUAL_SIDS2XIDS ,
2006-08-08 19:33:09 +04:00
WINBINDD_DUAL_UID2SID ,
WINBINDD_DUAL_GID2SID ,
2005-06-09 02:10:34 +04:00
/* Wrapper around possibly blocking unix nss calls */
WINBINDD_DUAL_USERINFO ,
WINBINDD_DUAL_GETSIDALIASES ,
2003-11-19 11:11:14 +03:00
2009-07-28 23:06:11 +04:00
WINBINDD_DUAL_NDRCMD ,
2006-08-19 05:04:54 +04:00
/* Complete the challenge phase of the NTLM authentication
protocol using cached password . */
WINBINDD_CCACHE_NTLMAUTH ,
2010-01-09 22:20:36 +03:00
WINBINDD_CCACHE_SAVE ,
2006-08-19 05:04:54 +04:00
2000-06-14 13:58:12 +04:00
WINBINDD_NUM_CMDS
2000-05-09 15:43:00 +04:00
} ;
2003-07-09 20:44:47 +04:00
typedef struct winbindd_pw {
fstring pw_name ;
fstring pw_passwd ;
uid_t pw_uid ;
gid_t pw_gid ;
fstring pw_gecos ;
fstring pw_dir ;
fstring pw_shell ;
} WINBINDD_PW ;
typedef struct winbindd_gr {
fstring gr_name ;
fstring gr_passwd ;
gid_t gr_gid ;
2007-09-13 18:14:02 +04:00
uint32_t num_gr_mem ;
uint32_t gr_mem_ofs ; /* offset to group membership */
2003-07-09 20:44:47 +04:00
} WINBINDD_GR ;
2013-01-16 23:31:32 +04:00
/* Request flags */
2007-06-27 13:38:07 +04:00
# define WBFLAG_PAM_INFO3_NDR 0x00000001
# define WBFLAG_PAM_INFO3_TEXT 0x00000002
# define WBFLAG_PAM_USER_SESSION_KEY 0x00000004
# define WBFLAG_PAM_LMKEY 0x00000008
# define WBFLAG_PAM_CONTACT_TRUSTDOM 0x00000010
2013-01-16 23:31:32 +04:00
# define WBFLAG_QUERY_ONLY 0x00000020 /* not used */
2013-01-16 23:33:31 +04:00
# define WBFLAG_PAM_AUTH_PAC 0x00000040
2007-06-27 13:38:07 +04:00
# define WBFLAG_PAM_UNIX_NAME 0x00000080
# define WBFLAG_PAM_AFS_TOKEN 0x00000100
# define WBFLAG_PAM_NT_STATUS_SQUASH 0x00000200
2005-06-09 02:10:34 +04:00
/* This is a flag that can only be sent from parent to child */
2007-08-28 19:16:42 +04:00
# define WBFLAG_IS_PRIVILEGED 0x00000400 /* not used */
2005-09-19 22:49:18 +04:00
/* Flag to say this is a winbindd internal send - don't recurse. */
2007-06-27 13:38:07 +04:00
# define WBFLAG_RECURSE 0x00000800
2013-01-16 23:31:32 +04:00
# define WBFLAG_PAM_KRB5 0x00001000
# define WBFLAG_PAM_FALLBACK_AFTER_KRB5 0x00002000
# define WBFLAG_PAM_CACHED_LOGIN 0x00004000
# define WBFLAG_PAM_GET_PWD_POLICY 0x00008000
2008-11-07 11:13:26 +03:00
/* Flag to tell winbind the NTLMv2 blob is too big for the struct and is in the
* extra_data field */
# define WBFLAG_BIG_NTLMV2_BLOB 0x00010000
2018-12-20 19:23:02 +03:00
# define WBFLAG_FROM_NSS 0x00020000
2006-02-04 01:19:41 +03:00
2005-09-30 21:13:37 +04:00
# define WINBINDD_MAX_EXTRA_DATA (128*1024)
2000-05-09 15:43:00 +04:00
/* Winbind request structure */
2006-07-19 00:19:55 +04:00
/*******************************************************************************
* This structure MUST be the same size in the 32 bit and 64 bit builds
* for compatibility between / lib64 / libnss_winbind . so and / lib / libnss_winbind . so
2008-12-16 11:30:16 +03:00
*
2006-07-19 00:19:55 +04:00
* DO NOT CHANGE THIS STRUCTURE WITHOUT TESTING THE 32 BIT NSS LIB AGAINST
* A 64 BIT WINBINDD - - jerry
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2000-05-09 15:43:00 +04:00
struct winbindd_request {
2007-09-13 18:14:02 +04:00
uint32_t length ;
2000-05-09 15:43:00 +04:00
enum winbindd_cmd cmd ; /* Winbindd command to execute */
2007-05-30 23:47:35 +04:00
enum winbindd_cmd original_cmd ; /* Original Winbindd command
issued to parent process */
2000-05-09 15:43:00 +04:00
pid_t pid ; /* pid of calling process */
2007-09-13 18:14:02 +04:00
uint32_t wb_flags ; /* generic flags */
uint32_t flags ; /* flags relevant *only* to a given request */
2003-08-11 02:01:11 +04:00
fstring domain_name ; /* name of domain for which the request applies */
2018-11-02 20:39:26 +03:00
char client_name [ 32 ] ; /* The client process sending the request */
2021-09-05 21:37:55 +03:00
uint64_t traceid ; /* debug traceid is sent from parent to child */
2000-05-09 15:43:00 +04:00
union {
2002-03-29 18:37:39 +03:00
fstring winsreq ; /* WINS request */
2000-06-14 13:58:12 +04:00
fstring username ; /* getpwnam */
fstring groupname ; /* getgrnam */
uid_t uid ; /* getpwuid, uid_to_sid */
gid_t gid ; /* getgrgid, gid_to_sid */
2009-07-28 23:06:11 +04:00
uint32_t ndrcmd ;
2000-05-09 15:43:00 +04:00
struct {
2017-07-17 16:40:11 +03:00
/* We deliberately don't split into domain/user to
2002-09-25 19:19:00 +04:00
avoid having the client know what the separator
2007-12-04 04:57:46 +03:00
character is . */
2000-05-09 15:43:00 +04:00
fstring user ;
fstring pass ;
2007-12-04 04:57:46 +03:00
char require_membership_of_sid [ 1024 ] ;
2006-02-04 01:19:41 +03:00
fstring krb5_cc_type ;
uid_t uid ;
2000-06-14 13:58:12 +04:00
} auth ; /* pam_winbind auth module */
2001-08-22 06:48:16 +04:00
struct {
2007-09-13 18:14:02 +04:00
uint8_t chal [ 8 ] ;
uint32_t logon_parameters ;
2001-08-22 06:48:16 +04:00
fstring user ;
2002-01-10 13:23:54 +03:00
fstring domain ;
2001-08-22 06:48:16 +04:00
fstring lm_resp ;
2007-09-13 18:14:02 +04:00
uint32_t lm_resp_len ;
2001-08-22 06:48:16 +04:00
fstring nt_resp ;
2007-09-13 18:14:02 +04:00
uint32_t nt_resp_len ;
2002-08-17 21:00:51 +04:00
fstring workstation ;
2004-10-01 07:28:39 +04:00
fstring require_membership_of_sid ;
2001-08-22 06:48:16 +04:00
} auth_crap ;
2000-06-14 13:58:12 +04:00
struct {
fstring user ;
fstring oldpass ;
fstring newpass ;
} chauthtok ; /* pam_winbind passwd module */
2006-07-13 13:29:25 +04:00
struct {
fstring user ;
fstring domain ;
2007-09-13 18:14:02 +04:00
uint8_t new_nt_pswd [ 516 ] ;
uint16_t new_nt_pswd_len ;
uint8_t old_nt_hash_enc [ 16 ] ;
uint16_t old_nt_hash_enc_len ;
uint8_t new_lm_pswd [ 516 ] ;
uint16_t new_lm_pswd_len ;
uint8_t old_lm_hash_enc [ 16 ] ;
uint16_t old_lm_hash_enc_len ;
2006-07-13 13:29:25 +04:00
} chng_pswd_auth_crap ; /* pam_winbind passwd module */
2006-02-04 01:19:41 +03:00
struct {
fstring user ;
fstring krb5ccname ;
uid_t uid ;
} logoff ; /* pam_winbind session module */
2000-06-14 13:58:12 +04:00
fstring sid ; /* lookupsid, sid_to_[ug]id */
2002-01-26 12:55:38 +03:00
struct {
fstring dom_name ; /* lookupname */
2007-12-04 04:57:46 +03:00
fstring name ;
2002-01-26 12:55:38 +03:00
} name ;
2007-09-13 18:14:02 +04:00
uint32_t num_entries ; /* getpwent, getgrent */
2003-07-09 20:44:47 +04:00
struct {
fstring username ;
fstring groupname ;
} acct_mgt ;
2005-06-09 02:10:34 +04:00
struct {
2007-09-13 18:14:02 +04:00
bool is_primary ;
2005-06-09 02:10:34 +04:00
fstring dcname ;
} init_conn ;
struct {
fstring sid ;
fstring name ;
} dual_sid2id ;
struct {
fstring sid ;
2007-09-13 18:14:02 +04:00
uint32_t type ;
uint32_t id ;
2005-06-09 02:10:34 +04:00
} dual_idmapset ;
2007-09-13 18:14:02 +04:00
bool list_all_domains ;
2006-07-19 00:19:55 +04:00
2006-08-19 05:04:54 +04:00
struct {
uid_t uid ;
fstring user ;
/* the effective uid of the client, must be the uid for 'user'.
This is checked by the main daemon , trusted by children . */
/* if the blobs are length zero, then this doesn't
produce an actual challenge response . It merely
succeeds if there are cached credentials available
that could be used . */
2007-09-13 18:14:02 +04:00
uint32_t initial_blob_len ; /* blobs in extra_data */
uint32_t challenge_blob_len ;
2006-08-19 05:04:54 +04:00
} ccache_ntlm_auth ;
2010-01-09 22:20:36 +03:00
struct {
uid_t uid ;
fstring user ;
fstring pass ;
} ccache_save ;
2008-09-27 05:05:47 +04:00
struct {
fstring domain_name ;
fstring domain_guid ;
fstring site_name ;
uint32_t flags ;
} dsgetdcname ;
2006-08-19 05:04:54 +04:00
2006-07-19 00:19:55 +04:00
/* padding -- needed to fix alignment between 32bit and 64bit libs.
2008-12-16 11:30:16 +03:00
The size is the sizeof the union without the padding aligned on
2006-07-19 00:19:55 +04:00
an 8 byte boundary . - - jerry */
2007-10-19 15:03:44 +04:00
char padding [ 1800 ] ;
2000-05-09 15:43:00 +04:00
} data ;
2006-04-12 18:10:39 +04:00
union {
2006-07-19 00:19:55 +04:00
SMB_TIME_T padding ;
2006-04-12 18:10:39 +04:00
char * data ;
} extra_data ;
2007-09-13 18:14:02 +04:00
uint32_t extra_len ;
2002-12-20 04:25:27 +03:00
char null_term ;
2000-05-09 15:43:00 +04:00
} ;
/* Response values */
enum winbindd_result {
2000-06-14 13:58:12 +04:00
WINBINDD_ERROR ,
2005-06-09 02:10:34 +04:00
WINBINDD_PENDING ,
2000-06-14 13:58:12 +04:00
WINBINDD_OK
2000-05-09 15:43:00 +04:00
} ;
/* Winbind response structure */
2006-07-19 00:19:55 +04:00
/*******************************************************************************
* This structure MUST be the same size in the 32 bit and 64 bit builds
* for compatibility between / lib64 / libnss_winbind . so and / lib / libnss_winbind . so
2008-12-16 11:30:16 +03:00
*
2006-07-19 00:19:55 +04:00
* DO NOT CHANGE THIS STRUCTURE WITHOUT TESTING THE 32 BIT NSS LIB AGAINST
* A 64 BIT WINBINDD - - jerry
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2000-05-09 15:43:00 +04:00
struct winbindd_response {
2008-12-16 11:30:16 +03:00
2000-06-14 13:58:12 +04:00
/* Header information */
2000-05-09 15:43:00 +04:00
2007-09-13 18:14:02 +04:00
uint32_t length ; /* Length of response */
2000-06-14 13:58:12 +04:00
enum winbindd_result result ; /* Result code */
2000-05-09 15:43:00 +04:00
2000-06-14 13:58:12 +04:00
/* Fixed length return data */
2008-12-16 11:30:16 +03:00
2000-06-14 13:58:12 +04:00
union {
2002-01-10 14:28:14 +03:00
int interface_version ; /* Try to ensure this is always in the same spot... */
2008-12-16 11:30:16 +03:00
2002-03-29 18:37:39 +03:00
fstring winsresp ; /* WINS response */
2000-06-30 10:48:47 +04:00
/* getpwnam, getpwuid */
2008-12-16 11:30:16 +03:00
2003-07-09 20:44:47 +04:00
struct winbindd_pw pw ;
2000-06-14 13:58:12 +04:00
2000-06-30 10:48:47 +04:00
/* getgrnam, getgrgid */
2000-06-14 13:58:12 +04:00
2003-07-09 20:44:47 +04:00
struct winbindd_gr gr ;
2000-06-14 13:58:12 +04:00
2007-09-13 18:14:02 +04:00
uint32_t num_entries ; /* getpwent, getgrent */
2001-11-21 11:36:43 +03:00
struct winbindd_sid {
2000-07-05 15:24:26 +04:00
fstring sid ; /* lookupname, [ug]id_to_sid */
int type ;
} sid ;
2001-11-21 11:36:43 +03:00
struct winbindd_name {
2002-01-26 12:55:38 +03:00
fstring dom_name ; /* lookupsid */
2008-12-16 11:30:16 +03:00
fstring name ;
2000-06-14 13:58:12 +04:00
int type ;
} name ;
uid_t uid ; /* sid_to_uid */
gid_t gid ; /* sid_to_gid */
2002-01-10 14:28:14 +03:00
struct winbindd_info {
char winbind_separator ;
fstring samba_version ;
} info ;
2002-01-26 12:55:38 +03:00
fstring domain_name ;
2003-01-28 15:07:02 +03:00
fstring netbios_name ;
2005-06-09 02:10:34 +04:00
fstring dc_name ;
2002-02-05 12:40:36 +03:00
struct auth_reply {
2007-09-13 18:14:02 +04:00
uint32_t nt_status ;
2002-02-05 12:40:36 +03:00
fstring nt_status_string ;
fstring error_string ;
int pam_error ;
2004-04-06 12:11:16 +04:00
char user_session_key [ 16 ] ;
2002-08-17 21:00:51 +04:00
char first_8_lm_hash [ 8 ] ;
2006-02-04 01:19:41 +03:00
fstring krb5ccname ;
2007-09-13 18:14:02 +04:00
uint32_t reject_reason ;
2017-01-29 19:46:12 +03:00
uint8_t authoritative ;
2018-01-10 12:20:46 +03:00
uint8_t padding [ 1 ] ;
uint16_t validation_level ;
2006-02-04 01:19:41 +03:00
struct policy_settings {
2007-09-13 18:14:02 +04:00
uint32_t min_length_password ;
uint32_t password_history ;
uint32_t password_properties ;
uint32_t padding ;
2006-07-19 00:19:55 +04:00
SMB_TIME_T expire ;
SMB_TIME_T min_passwordage ;
2006-02-04 01:19:41 +03:00
} policy ;
struct info3_text {
2006-07-19 00:19:55 +04:00
SMB_TIME_T logon_time ;
SMB_TIME_T logoff_time ;
SMB_TIME_T kickoff_time ;
SMB_TIME_T pass_last_set_time ;
SMB_TIME_T pass_can_change_time ;
SMB_TIME_T pass_must_change_time ;
2007-09-13 18:14:02 +04:00
uint32_t logon_count ;
uint32_t bad_pw_count ;
uint32_t user_rid ;
uint32_t group_rid ;
uint32_t num_groups ;
uint32_t user_flgs ;
uint32_t acct_flags ;
uint32_t num_other_sids ;
2006-07-19 00:19:55 +04:00
fstring dom_sid ;
2006-02-04 01:19:41 +03:00
fstring user_name ;
fstring full_name ;
fstring logon_script ;
fstring profile_path ;
fstring home_dir ;
fstring dir_drive ;
fstring logon_srv ;
fstring logon_dom ;
} info3 ;
2018-01-10 12:20:46 +03:00
struct info6_text {
fstring dns_domainname ;
fstring principal_name ;
} info6 ;
2008-02-28 15:29:47 +03:00
fstring unix_username ;
2002-02-05 12:40:36 +03:00
} auth ;
2004-01-04 14:51:31 +03:00
struct {
fstring name ;
fstring alt_name ;
fstring sid ;
2007-09-13 18:14:02 +04:00
bool native_mode ;
bool active_directory ;
bool primary ;
2004-01-04 14:51:31 +03:00
} domain_info ;
2007-09-19 23:05:54 +04:00
uint32_t sequence_number ;
2005-06-09 02:10:34 +04:00
struct {
fstring acct_name ;
fstring full_name ;
2005-06-29 18:03:53 +04:00
fstring homedir ;
fstring shell ;
2007-09-13 18:14:02 +04:00
uint32_t primary_gid ;
uint32_t group_rid ;
2005-06-09 02:10:34 +04:00
} user_info ;
2006-08-19 05:04:54 +04:00
struct {
2010-01-24 18:41:30 +03:00
uint8_t session_key [ 16 ] ;
2007-09-13 18:14:02 +04:00
uint32_t auth_blob_len ; /* blob in extra_data */
2015-11-20 16:06:18 +03:00
uint8_t new_spnego ;
2006-08-19 05:04:54 +04:00
} ccache_ntlm_auth ;
2008-09-27 05:05:47 +04:00
struct {
fstring dc_unc ;
fstring dc_address ;
uint32_t dc_address_type ;
fstring domain_guid ;
fstring domain_name ;
fstring forest_name ;
uint32_t dc_flags ;
fstring dc_site_name ;
fstring client_site_name ;
} dsgetdcname ;
2000-06-14 13:58:12 +04:00
} data ;
2000-05-09 15:43:00 +04:00
2000-06-14 13:58:12 +04:00
/* Variable length return data */
2000-05-09 15:43:00 +04:00
2006-04-12 18:10:39 +04:00
union {
2006-07-19 00:19:55 +04:00
SMB_TIME_T padding ;
2006-04-12 18:10:39 +04:00
void * data ;
} extra_data ;
2000-05-09 15:43:00 +04:00
} ;
2021-11-22 20:11:27 +03:00
/* Free a response structure */
static inline void winbindd_free_response ( struct winbindd_response * response )
{
/* Free any allocated extra_data */
if ( response )
SAFE_FREE ( response - > extra_data . data ) ;
}
2000-05-09 15:43:00 +04:00
# endif