1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-29 16:23:52 +03:00

Fixed some more client SPOOLSS functions. The following

functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs

All part of the ongoing rpcclient work.

Also included a new generic list ADT.  Cleaner and simplier
than the stuff in util_array.c i think (but then that's why I wrote it).





--jerry
This commit is contained in:
Gerald Carter
-
parent f7bc6df3be
commit 381aba2c9a
8 changed files with 563 additions and 479 deletions

View File

@@ -612,6 +612,7 @@ extern int errno;
#include "trans2.h"
#include "nterr.h"
#include "secrets.h"
#include "util_list.h"
#ifndef UBI_BINTREE_H
#include "ubi_Cache.h"

View File

@@ -244,27 +244,6 @@ struct acct_info
/* end higher order functions */
struct cli_connection;
typedef struct cli_auth_fns
{
/* these three will do for now. they *should* match with server-side */
BOOL (*create_bind_req) (struct cli_connection *, prs_struct *,
uint32, RPC_IFACE *, RPC_IFACE *);
BOOL (*decode_bind_resp) (struct cli_connection *, prs_struct *);
BOOL (*create_bind_cont) (struct cli_connection *, prs_struct *,
uint32);
/* creates an authenticated PDU */
BOOL (*cli_create_pdu) (struct cli_connection *, uint8,
prs_struct *, int, int *,
prs_struct *, uint8 *);
/* decodes an authenticated PDU */
BOOL (*cli_decode_pdu) (struct cli_connection *, prs_struct *,
int, int);
}
cli_auth_fns;
/* security descriptor structures */
#include "rpc_secdes.h"

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _RPC_CREDS_H /* _RPC_CREDS_H */
#define _RPC_CREDS_H

View File

@@ -341,4 +341,5 @@ typedef struct rpc_auth_ntlmssp_chk_info
#define RPC_AUTH_NTLMSSP_CHK_LEN 16
#endif /* _DCE_RPC_H */

View File

@@ -21,11 +21,13 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "ntdomain.h"
#include "rpc_dce.h"
#ifndef _RPC_MISC_H /* _RPC_MISC_H */
#define _RPC_MISC_H
#include "rpc_dce.h"
/* well-known RIDs - Relative IDs */
@@ -293,6 +295,39 @@ typedef struct lsa_policy_info
} POLICY_HND;
/*
* A client connection's state, pipe name,
* user credentials, etc...
*/
typedef struct _cli_auth_fns cli_auth_fns;
struct user_creds;
struct cli_connection {
uint32 num_connections;
char *srv_name;
char *pipe_name;
struct user_creds usr_creds;
struct cli_state *pCli_state;
cli_auth_fns *auth;
void *auth_info;
void *auth_creds;
};
/*
* Associate a POLICY_HND with a cli_connection
*/
typedef struct rpc_hnd_node {
POLICY_HND hnd;
struct cli_connection *cli;
} RPC_HND_NODE;
typedef struct uint64_s
{
uint32 low;

View File

@@ -351,8 +351,6 @@
#define PRINTER_ENUM_ICON7 0x00400000
#define PRINTER_ENUM_ICON8 0x00800000
#define POLICY_HND_SIZE 20
/* this struct is undocumented */
/* thanks to the ddk ... */
typedef struct spool_user_1

View File

@@ -0,0 +1,59 @@
/*
Unix SMB/Netbios implementation.
Version 1.9.
Samba utility functions
Copyright (C) Andrew Tridgell 1992-1999
Copyright (C) Gerald Carter <jerry@samba.org> 2000
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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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.
*/
/******************************************************************
Implementation of a generic list. See lib/util_list.c for
details on using this.
*****************************************************************/
#include "smb.h"
#ifndef _GENERIC_LIST_H
#define _GENERIC_LIST_H
struct _list_node;
/*
* node container in list
*/
struct _list_node {
void *data; /* generic container pointer */
uint8 type; /* needed for identifiers
in a hetergenous list */
struct _list_node *next; /* next in the list */
};
/*
* list data structure
*/
typedef struct _generic_list {
struct _list_node *head, *tail;
uint32 length;
BOOL initialized;
} GENERIC_LIST;
#endif /* _GENERIC_LIST_H */