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/>. */
#include "includes.h"
#include "utils/net.h"
fstring defaultdatatype = "";
int length=0;
- BOOL valid = True;
+ bool valid = True;
if (i1 == NULL)
return;
struct cli_state *cli_share_src,
struct cli_state *cli_share_dst,
const char *src_name, const char *dst_name,
- BOOL copy_acls, BOOL copy_attrs,
- BOOL copy_timestamps, BOOL is_file)
+ bool copy_acls, bool copy_attrs,
+ bool copy_timestamps, bool is_file)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int fnum_src = 0;
struct cli_state *cli_share_src,
struct cli_state *cli_share_dst,
const char *src_name, const char *dst_name,
- BOOL copy_acls, BOOL copy_attrs,
- BOOL copy_timestamps, BOOL is_file)
+ bool copy_acls, bool copy_attrs,
+ bool copy_timestamps, bool is_file)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int fnum_src = 0;
static int io_bufsize = 64512;
int read_size = io_bufsize;
char *data = NULL;
- off_t start = 0;
off_t nread = 0;
/* copying file */
int n, ret;
- n = cli_read(cli_share_src, fnum_src, data, nread + start,
+ n = cli_read(cli_share_src, fnum_src, data, nread,
read_size);
if (n <= 0)
break;
ret = cli_write(cli_share_dst, fnum_dst, 0, data,
- nread + start, n);
+ nread, n);
if (n != ret) {
d_fprintf(stderr, "Error writing file: %s\n",
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int length = 0;
- BOOL valid = True;
+ bool valid = True;
fstring name = "";
fstring driverpath = "";
*
**/
-static BOOL net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
char *name,
uint32 flags,
return True;
}
-static BOOL net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
const char *printername,
uint32 access_required,
return True;
}
-static BOOL net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
uint32 level,
return True;
}
-static BOOL net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
uint32 level,
}
-static BOOL net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
REGISTRY_VALUE *value)
}
-static BOOL net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
const char *keyname,
return True;
}
-static BOOL net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
uint32 offered,
POLICY_HND *hnd,
}
-static BOOL net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
char *keyname,
return True;
}
-static BOOL net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
int level,
return True;
}
-static BOOL net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
uint32 level, const char *env,
uint32 *num_drivers,
return True;
}
-static BOOL net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, uint32 level,
const char *env, int version,
}
-static BOOL net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx, uint32 level,
PRINTER_DRIVER_CTR *ctr)
{
* for a single printer or for all printers depending on argc/argv
**/
-static BOOL get_printer_info(struct rpc_pipe_client *pipe_hnd,
+static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
int level,
int argc,
pstring printername, sharename;
PRINTER_INFO_CTR ctr, ctr_pub;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
WERROR result;
const char *action_str;
pstring guid;
PRINTER_INFO_CTR ctr, ctr_pub;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
int state;
if (!get_printer_info(pipe_hnd, mem_ctx, 2, argc, argv, &num_printers, &ctr))
uint32 num_printers;
uint32 level = 2;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_src, ctr_dst, ctr_enum;
uint32 num_printers;
uint32 level = 1;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_enum, ctr_dst;
uint32 num_printers;
uint32 level = 3;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
- BOOL got_src_driver_share = False;
- BOOL got_dst_driver_share = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
+ bool got_src_driver_share = False;
+ bool got_dst_driver_share = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_DRIVER_CTR drv_ctr_src, drv_ctr_dst;
struct cli_state *cli_dst = NULL;
POLICY_HND hnd_dst, hnd_src;
pstring printername, sharename;
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
DEBUG(3,("copying printers\n"));
uint32 num_printers, val_needed, data_needed;
uint32 level = 2;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_enum, ctr_dst, ctr_dst_publish;