This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */
*/
typedef struct _prs_struct {
- BOOL io; /* parsing in or out of data stream */
+ bool io; /* parsing in or out of data stream */
/*
* If the (incoming) data is big-endian. On output we are
* always little-endian.
*/
- BOOL bigendian_data;
+ bool bigendian_data;
uint8 align; /* data alignment */
- BOOL is_dynamic; /* Do we own this memory or not ? */
+ bool is_dynamic; /* Do we own this memory or not ? */
uint32 data_offset; /* Current working offset into data. */
uint32 buffer_size; /* Current allocated size of the buffer. */
uint32 grow_size; /* size requested via prs_grow() calls */
/* Domain controller authentication protocol info */
struct dcinfo {
uint32 sequence; /* "timestamp" from client. */
- DOM_CHAL seed_chal;
- DOM_CHAL clnt_chal; /* Client credential */
- DOM_CHAL srv_chal; /* Server credential */
+ struct netr_Credential seed_chal;
+ struct netr_Credential clnt_chal; /* Client credential */
+ struct netr_Credential srv_chal; /* Server credential */
- uchar sess_key[8]; /* Session key */
- uchar mach_pw[16]; /* md4(machine password) */
+ unsigned char sess_key[16]; /* Session key - 8 bytes followed by 8 zero bytes */
+ unsigned char mach_pw[16]; /* md4(machine password) */
fstring mach_acct; /* Machine name we've authenticated. */
fstring remote_machine; /* Machine name we've authenticated. */
fstring domain;
- BOOL challenge_sent;
- BOOL authenticated;
+ bool challenge_sent;
+ bool authenticated;
};
typedef struct pipe_rpc_fns {
/* auth state for schannel. */
struct schannel_auth_struct {
- uchar sess_key[16];
+ unsigned char sess_key[16];
uint32 seq_num;
};
struct dcinfo *dc; /* Keeps the creds data from netlogon. */
- /*
- * Windows user info.
- */
- fstring user_name;
- fstring domain;
- fstring wks;
-
/*
* Unix user name and credentials used when a pipe is authenticated.
*/
* Set to true when an RPC bind has been done on this pipe.
*/
- BOOL pipe_bound;
+ bool pipe_bound;
/*
* Set to true when we should return fault PDU's for everything.
*/
- BOOL fault_state;
+ bool fault_state;
/*
* Set to true when we should return fault PDU's for a bad handle.
*/
- BOOL bad_handle_fault_state;
+ bool bad_handle_fault_state;
+
+ /*
+ * Set to true when the backend does not support a call.
+ */
+
+ bool rng_fault_state;
/*
* Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
*/
- BOOL endian;
+ bool endian;
/*
* Struct to deal with multiple pdu inputs.
int pnum;
connection_struct *conn;
uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
- BOOL open; /* open connection */
+ bool open; /* open connection */
uint16 device_state;
uint16 priority;
- fstring name;
+ char *name;
/* When replying to an SMBtrans, this is the maximum amount of
data that can be sent in the initial reply. */
* returns: state information representing the connection.
* is stored in np_state, above.
*/
- void * (*namedpipe_create)(char *pipe_name,
+ void * (*namedpipe_create)(const char *pipe_name,
connection_struct *conn, uint16 vuid);
/* call to perform a write / read namedpipe transaction.
ssize_t (*namedpipe_transact)(void *np_state,
char *data, int len,
char *rdata, int rlen,
- BOOL *pipe_outstanding);
+ bool *pipe_outstanding);
/* call to perform a write namedpipe operation
*/
*/
ssize_t (*namedpipe_read)(void * np_state,
char *data, size_t max_len,
- BOOL *pipe_outstanding);
+ bool *pipe_outstanding);
/* call to close a namedpipe.
* function is expected to perform all cleanups
* returns True if cleanup was successful (not that
* we particularly care).
*/
- BOOL (*namedpipe_close)(void * np_state);
+ bool (*namedpipe_close)(void * np_state);
} smb_np_struct;
struct api_struct {
const char *name;
uint8 opnum;
- BOOL (*fn) (pipes_struct *);
+ bool (*fn) (pipes_struct *);
};
typedef struct {