From 928b5349611b84796223c35e0d20a05c9f6c5c0d Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Dec 2002 17:51:40 +0000 Subject: forgont genstruct.pl is needed to build new include files for genparse sorry (This used to be commit 4029dae9064e10a02006e9d0a5d8cf93e22eaed5) --- source3/script/genstruct.pl | 298 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100755 source3/script/genstruct.pl (limited to 'source3') diff --git a/source3/script/genstruct.pl b/source3/script/genstruct.pl new file mode 100755 index 0000000000..e6d30773d6 --- /dev/null +++ b/source3/script/genstruct.pl @@ -0,0 +1,298 @@ +#!/usr/bin/perl -w +# a simple system for generating C parse info +# this can be used to write generic C structer load/save routines +# Copyright 2002 Andrew Tridgell +# released under the GNU General Public License v2 or later + +use strict; + +my(%enum_done) = (); +my(%struct_done) = (); + +################################################### +# general handler +sub handle_general($$$$$$$$) +{ + my($name) = shift; + my($ptr_count) = shift; + my($size) = shift; + my($element) = shift; + my($flags) = shift; + my($dump_fn) = shift; + my($parse_fn) = shift; + my($tflags) = shift; + my($array_len) = 0; + my($dynamic_len) = "NULL"; + + # handle arrays, currently treat multidimensional arrays as 1 dimensional + while ($element =~ /(.*)\[(.*?)\]$/) { + $element = $1; + if ($array_len == 0) { + $array_len = $2; + } else { + $array_len = "$2 * $array_len"; + } + } + + if ($flags =~ /_LEN\((\w*?)\)/) { + $dynamic_len = "\"$1\""; + } + + if ($flags =~ /_NULLTERM/) { + $tflags = "FLAG_NULLTERM"; + } + + print OFILE "{\"$element\", $ptr_count, $size, offsetof(struct $name, $element), $array_len, $dynamic_len, $tflags, $dump_fn, $parse_fn},\n"; +} + + +#################################################### +# parse one element +sub parse_one($$$$) +{ + my($name) = shift; + my($type) = shift; + my($element) = shift; + my($flags) = shift; + my($ptr_count) = 0; + my($size) = "sizeof($type)"; + my($tflags) = "0"; + + # enums get the FLAG_ALWAYS flag + if ($type =~ /^enum /) { + $tflags = "FLAG_ALWAYS"; + } + + + # make the pointer part of the base type + while ($element =~ /^\*(.*)/) { + $ptr_count++; + $element = $1; + } + + # convert spaces to _ + $type =~ s/ /_/g; + + my($dump_fn) = "gen_dump_$type"; + my($parse_fn) = "gen_parse_$type"; + + handle_general($name, $ptr_count, $size, $element, $flags, $dump_fn, $parse_fn, $tflags); +} + +#################################################### +# parse one element +sub parse_element($$$) +{ + my($name) = shift; + my($element) = shift; + my($flags) = shift; + my($type); + my($data); + + # pull the base type + if ($element =~ /^struct (\S*) (.*)/) { + $type = "struct $1"; + $data = $2; + } elsif ($element =~ /^enum (\S*) (.*)/) { + $type = "enum $1"; + $data = $2; + } elsif ($element =~ /^unsigned (\S*) (.*)/) { + $type = "unsigned $1"; + $data = $2; + } elsif ($element =~ /^(\S*) (.*)/) { + $type = $1; + $data = $2; + } else { + die "Can't parse element '$element'"; + } + + # handle comma separated lists + while ($data =~ /(\S*),[\s]?(.*)/) { + parse_one($name, $type, $1, $flags); + $data = $2; + } + parse_one($name, $type, $data, $flags); +} + + +my($first_struct) = 1; + +#################################################### +# parse the elements of one structure +sub parse_elements($$) +{ + my($name) = shift; + my($elements) = shift; + + if ($first_struct) { + $first_struct = 0; + print "Parsing structs: $name"; + } else { + print ", $name"; + } + + print OFILE "int gen_dump_struct_$name(struct parse_string *, const char *, unsigned);\n"; + print OFILE "int gen_parse_struct_$name(char *, const char *);\n"; + + print OFILE "static const struct parse_struct pinfo_" . $name . "[] = {\n"; + + while ($elements =~ /^.*?([a-z].*?);\s*?(\S*?)\s*?$(.*)/msi) { + my($element) = $1; + my($flags) = $2; + $elements = $3; + parse_element($name, $element, $flags); + } + + print OFILE "{NULL, 0, 0, 0, 0, NULL, 0, NULL, NULL}};\n"; + + print OFILE " +int gen_dump_struct_$name(struct parse_string *p, const char *ptr, unsigned indent) { + return gen_dump_struct(pinfo_$name, p, ptr, indent); +} +int gen_parse_struct_$name(char *ptr, const char *str) { + return gen_parse_struct(pinfo_$name, ptr, str); +} + +"; +} + +my($first_enum) = 1; + +#################################################### +# parse out the enum declarations +sub parse_enum_elements($$) +{ + my($name) = shift; + my($elements) = shift; + + if ($first_enum) { + $first_enum = 0; + print "Parsing enums: $name"; + } else { + print ", $name"; + } + + print OFILE "static const struct enum_struct einfo_" . $name . "[] = {\n"; + + my(@enums) = split(/,/s, $elements); + for (my($i)=0; $i <= $#{@enums}; $i++) { + my($enum) = $enums[$i]; + if ($enum =~ /\s*(\w*)/) { + my($e) = $1; + print OFILE "{\"$e\", $e},\n"; + } + } + + print OFILE "{NULL, 0}};\n"; + + print OFILE " +int gen_dump_enum_$name(struct parse_string *p, const char *ptr, unsigned indent) { + return gen_dump_enum(einfo_$name, p, ptr, indent); +} + +int gen_parse_enum_$name(char *ptr, const char *str) { + return gen_parse_enum(einfo_$name, ptr, str); +} + +"; +} + +#################################################### +# parse out the enum declarations +sub parse_enums($) +{ + my($data) = shift; + + while ($data =~ /^GENSTRUCT\s+enum\s+(\w*?)\s*{(.*?)}\s*;(.*)/ms) { + my($name) = $1; + my($elements) = $2; + $data = $3; + + if (!defined($enum_done{$name})) { + $enum_done{$name} = 1; + parse_enum_elements($name, $elements); + } + } + + if (! $first_enum) { + print "\n"; + } +} + +#################################################### +# parse all the structures +sub parse_structs($) +{ + my($data) = shift; + + # parse into structures + while ($data =~ /^GENSTRUCT\s+struct\s+(\w+?)\s*{\s*(.*?)\s*}\s*;(.*)/ms) { + my($name) = $1; + my($elements) = $2; + $data = $3; + if (!defined($struct_done{$name})) { + $struct_done{$name} = 1; + parse_elements($name, $elements); + } + } + + if (! $first_struct) { + print "\n"; + } else { + print "No GENSTRUCT structures found?\n"; + } +} + + +#################################################### +# parse a header file, generating a dumper structure +sub parse_data($) +{ + my($data) = shift; + + # collapse spaces + $data =~ s/[\t ]+/ /sg; + $data =~ s/\s*\n\s+/\n/sg; + # strip debug lines + $data =~ s/^\#.*?\n//smg; + + parse_enums($data); + parse_structs($data); +} + + +######################################### +# display help text +sub ShowHelp() +{ + print " +generator for C structure dumpers +Copyright Andrew Tridgell + +Sample usage: + genstruct -o output.h gcc -E -O2 -g test.h + +Options: + --help this help page + -o OUTPUT place output in OUTPUT +"; + exit(0); +} + +######################################## +# main program +if ($ARGV[0] ne "-o" || $#ARGV < 2) { + ShowHelp(); +} + +shift; +my($opt_ofile)=shift; + +print "creating $opt_ofile\n"; + +open(OFILE, ">$opt_ofile") || die "can't open $opt_ofile"; + +print OFILE "/* This is an automatically generated file - DO NOT EDIT! */\n\n"; + +parse_data(`@ARGV -DGENSTRUCT=GENSTRUCT`); +exit(0); -- cgit From b242cfe6b3965796d550ea9d84747cb302fbfac2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Dec 2002 21:22:09 +0000 Subject: oh god, I will forgot my name one of these days :-/ (This used to be commit 0b2591cc4001dd5430591f1871b76c1a6d133b43) --- source3/include/genparser.h | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 source3/include/genparser.h (limited to 'source3') diff --git a/source3/include/genparser.h b/source3/include/genparser.h new file mode 100644 index 0000000000..002d79f8f9 --- /dev/null +++ b/source3/include/genparser.h @@ -0,0 +1,78 @@ +/* + Copyright (C) Andrew Tridgell 2002 + + 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. +*/ + +#ifndef _GENPARSER_H +#define _GENPARSER_H + +/* these macros are needed for genstruct auto-parsers */ +#ifndef GENSTRUCT +#define GENSTRUCT +#define _LEN(x) +#define _NULLTERM +#endif + +/* + automatic marshalling/unmarshalling system for C structures +*/ + +/* flag to mark a fixed size array as actually being null terminated */ +#define FLAG_NULLTERM 1 +#define FLAG_ALWAYS 2 + +struct enum_struct { + const char *name; + unsigned value; +}; + +/* intermediate dumps are stored in one of these */ +struct parse_string { + unsigned allocated; + unsigned length; + char *s; +}; + +typedef int (*gen_dump_fn)(struct parse_string *, const char *ptr, unsigned indent); +typedef int (*gen_parse_fn)(char *ptr, const char *str); + +/* genstruct.pl generates arrays of these */ +struct parse_struct { + const char *name; + unsigned ptr_count; + unsigned size; + unsigned offset; + unsigned array_len; + const char *dynamic_len; + unsigned flags; + gen_dump_fn dump_fn; + gen_parse_fn parse_fn; +}; + +#define DUMP_PARSE_DECL(type) \ + int gen_dump_ ## type(struct parse_string *, const char *, unsigned); \ + int gen_parse_ ## type(char *, const char *); + +DUMP_PARSE_DECL(char) +DUMP_PARSE_DECL(int) +DUMP_PARSE_DECL(unsigned) +DUMP_PARSE_DECL(double) +DUMP_PARSE_DECL(float) + +#define gen_dump_unsigned_char gen_dump_char +#define gen_parse_unsigned_char gen_parse_char + +#endif /* _GENPARSER_H */ -- cgit From 96978d397a7a17ba6ed77214c461d26e850ee94a Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 16 Dec 2002 21:30:20 +0000 Subject: merge smbtar fixes from 2.2 (This used to be commit f3b994326ea4bfc9a74acb2901c733c35900af53) --- source3/client/clitar.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/client/clitar.c b/source3/client/clitar.c index c453cfbb54..bf26beb652 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -45,10 +45,10 @@ typedef struct file_info_struct file_info2; struct file_info_struct { - size_t size; + SMB_BIG_UINT size; uint16 mode; - int uid; - int gid; + uid_t uid; + gid_t gid; /* These times are normally kept in GMT */ time_t mtime; time_t atime; @@ -620,6 +620,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) finfo.mtime = finfo1 -> mtime; finfo.atime = finfo1 -> atime; finfo.ctime = finfo1 -> ctime; + finfo.name = finfo1 -> name; } else { finfo.size = def_finfo.size; @@ -629,13 +630,14 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) finfo.mtime = def_finfo.mtime; finfo.atime = def_finfo.atime; finfo.ctime = def_finfo.ctime; + finfo.name = def_finfo.name; } if (dry_run) { - DEBUG(3,("skipping file %s of size %d bytes\n", + DEBUG(3,("skipping file %s of size %12.0f bytes\n", finfo.name, - (int)finfo.size)); + (double)finfo.size)); shallitime=0; ttarf+=finfo.size + TBLOCK - (finfo.size % TBLOCK); ntarf++; @@ -1833,7 +1835,7 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind) if (tar_type=='c' && (dry_run || strcmp(argv[Optind], "/dev/null")==0)) { if (!dry_run) { - DEBUG(0,("Output is /dev/null, assuming dry_run")); + DEBUG(0,("Output is /dev/null, assuming dry_run\n")); dry_run = True; } tarhandle=-1; -- cgit From a628d7d54d069de57ec4ba24bd0475a9435a3d1a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Dec 2002 23:40:15 +0000 Subject: Uhmm a bad day to commit changes :-(( (This used to be commit 5320d54b901b92a3a8cdf9a407651713826c6c9f) --- source3/include/includes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') diff --git a/source3/include/includes.h b/source3/include/includes.h index 26cab70b9d..a958fd416c 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -770,6 +770,8 @@ extern int errno; #include "nsswitch/winbind_client.h" +#include "genparser.h" + /* * Type for wide character dirent structure. * Only d_name is defined by POSIX. -- cgit From 1a37c02890bff10c9bc5a06ed0422db878382a13 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 17 Dec 2002 01:38:48 +0000 Subject: it's getting comic ... yet another missing piece :-O (This used to be commit eb595efa7e6c260092478564e5fb3fdefcc120d8) --- source3/include/genparser_samba.h | 58 +++++++++++++++++++++++++++++++++++++++ source3/tdb/tdbtool.c | 3 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 source3/include/genparser_samba.h (limited to 'source3') diff --git a/source3/include/genparser_samba.h b/source3/include/genparser_samba.h new file mode 100644 index 0000000000..172ff2362c --- /dev/null +++ b/source3/include/genparser_samba.h @@ -0,0 +1,58 @@ +/* + Copyright (C) Simo Sorce 2002 + + 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. +*/ + +#ifndef _GENPARSER_SAMBA_H +#define _GENPARSER_SAMBA_H + +const struct parse_struct pinfo_security_ace_info[] = { +{"type", 0, sizeof(uint8), offsetof(struct security_ace_info, type), 0, NULL, 0, gen_dump_uint8, gen_parse_uint8}, +{"flags", 0, sizeof(uint8), offsetof(struct security_ace_info, flags), 0, NULL, 0, gen_dump_uint8, gen_parse_uint8}, +{"size", 0, sizeof(uint16), offsetof(struct security_ace_info, size), 0, NULL, 0, gen_dump_uint16, gen_parse_uint16}, +{"info", 0, sizeof(char), offsetof(struct security_ace_info, info), 0, NULL, 0, gen_dump_SEC_ACCESS, gen_parse_SEC_ACCESS}, +{"obj_flags", 0, sizeof(uint32), offsetof(struct security_ace_info, obj_flags), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"obj_guid", 0, sizeof(char), offsetof(struct security_ace_info, obj_guid), 0, NULL, 0, gen_dump_GUID, gen_parse_GUID}, +{"inh_guid", 0, sizeof(char), offsetof(struct security_ace_info, inh_guid), 0, NULL, 0, gen_dump_GUID, gen_parse_GUID}, +{"trustee", 0, sizeof(char), offsetof(struct security_ace_info, trustee), 0, NULL, 0, gen_dump_DOM_SID, gen_parse_DOM_SID}, +{NULL, 0, 0, 0, 0, NULL, 0, NULL, NULL}}; + +const struct parse_struct pinfo_security_acl_info[] = { +{"revision", 0, sizeof(uint16), offsetof(struct security_acl_info, revision), 0, NULL, 0, gen_dump_uint16, gen_parse_uint16}, +{"size", 0, sizeof(uint16), offsetof(struct security_acl_info, size), 0, NULL, 0, gen_dump_uint16, gen_parse_uint16}, +{"num_aces", 0, sizeof(uint32), offsetof(struct security_acl_info, num_aces), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"ace", 1, sizeof(struct security_ace_info), offsetof(struct security_acl_info, ace), 0, "size", 0, gen_dump_SEC_ACE, gen_parse_SEC_ACE}, +{NULL, 0, 0, 0, 0, NULL, 0, NULL, NULL}}; + +const struct parse_struct pinfo_security_descriptor_info[] = { +{"revision", 0, sizeof(uint16), offsetof(struct security_descriptor_info, revision), 0, NULL, 0, gen_dump_uint16, gen_parse_uint16}, +{"type", 0, sizeof(uint16), offsetof(struct security_descriptor_info, type), 0, NULL, 0, gen_dump_uint16, gen_parse_uint16}, +{"off_owner_sid", 0, sizeof(uint32), offsetof(struct security_descriptor_info, off_owner_sid), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"off_grp_sid", 0, sizeof(uint32), offsetof(struct security_descriptor_info, off_grp_sid), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"off_sacl", 0, sizeof(uint32), offsetof(struct security_descriptor_info, off_sacl), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"off_dacl", 0, sizeof(uint32), offsetof(struct security_descriptor_info, off_dacl), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"dacl", 1, sizeof(struct security_acl_info), offsetof(struct security_descriptor_info, dacl), 0, NULL, 0, gen_dump_SEC_ACL, gen_parse_SEC_ACL}, +{"sacl", 1, sizeof(struct security_acl_info), offsetof(struct security_descriptor_info, sacl), 0, NULL, 0, gen_dump_SEC_ACL, gen_parse_SEC_ACL}, +{"owner_sid", 1, sizeof(char), offsetof(struct security_descriptor_info, owner_sid), 0, NULL, 0, gen_dump_DOM_SID, gen_parse_DOM_SID}, +{"grp_sid", 1, sizeof(char), offsetof(struct security_descriptor_info, grp_sid), 0, NULL, 0, gen_dump_DOM_SID, gen_parse_DOM_SID}, +{NULL, 0, 0, 0, 0, NULL, 0, NULL, NULL}}; + +const struct parse_struct pinfo_luid_attr_info[] = { +{"attr", 0, sizeof(uint32), offsetof(struct LUID_ATTR, attr), 0, NULL, 0, gen_dump_uint32, gen_parse_uint32}, +{"luid", 1, sizeof(LUID), offsetof(struct LUID_ATTR, luid), 0, NULL, 0, gen_dump_LUID, gen_parse_LUID}, +{NULL, 0, 0, 0, 0, NULL, 0, NULL, NULL}}; + +#endif /* _GENPARSER_SAMBA_H */ diff --git a/source3/tdb/tdbtool.c b/source3/tdb/tdbtool.c index f529c6e6ee..f5e486be14 100644 --- a/source3/tdb/tdbtool.c +++ b/source3/tdb/tdbtool.c @@ -251,7 +251,8 @@ static void show_tdb(void) } key.dptr = k; - key.dsize = strlen(k)+1; +/* key.dsize = strlen(k)+1;*/ + key.dsize = strlen(k); dbuf = tdb_fetch(tdb, key); if (!dbuf.dptr) { -- cgit From a3460ac9ba56064252e87600a4e5a5a7e316134c Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Tue, 17 Dec 2002 07:45:14 +0000 Subject: Start adding code to allow the in memory version of the registry tree structure to be manipulated. Keys can be partially deleted now. (This used to be commit 9181ba0c682c3f37bbbaab96928c39757491d225) --- source3/utils/editreg.c | 191 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 168 insertions(+), 23 deletions(-) (limited to 'source3') diff --git a/source3/utils/editreg.c b/source3/utils/editreg.c index 67dc06cf5d..532dffe068 100644 --- a/source3/utils/editreg.c +++ b/source3/utils/editreg.c @@ -543,12 +543,91 @@ int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, char *path, /* Make, delete keys */ + + int nt_delete_val_list(VAL_LIST *vl) { return 1; } +int nt_delete_val_key(VAL_KEY *val_key) +{ + + return 1; +} + +int nt_delete_key_list(KEY_LIST *key_list) +{ + + return 1; +} + +int nt_delete_sid(DOM_SID *sid) +{ + + if (sid) free(sid); + return 1; + +} + +int nt_delete_ace(ACE *ace) +{ + + if (ace) { + nt_delete_sid(ace->trustee); + free(ace); + } + return 1; + +} + +int nt_delete_acl(ACL *acl) +{ + + if (acl) { + int i; + + for (i=0; inum_aces; i++) + nt_delete_ace(acl->aces[i]); + + free(acl); + } + return 1; +} + +int nt_delete_sec_desc(SEC_DESC *sec_desc) +{ + + if (sec_desc) { + + nt_delete_sid(sec_desc->owner); + nt_delete_sid(sec_desc->group); + nt_delete_acl(sec_desc->sacl); + nt_delete_acl(sec_desc->dacl); + free(sec_desc); + + } + return 1; +} + +int nt_delete_key_sec_desc(KEY_SEC_DESC *key_sec_desc) +{ + + if (key_sec_desc) { + key_sec_desc->ref_cnt--; + if (key_sec_desc->ref_cnt<=0) { + /* + * There should always be a next and prev, even if they point to us + */ + key_sec_desc->next->prev = key_sec_desc->prev; + key_sec_desc->prev->next = key_sec_desc->next; + nt_delete_sec_desc(key_sec_desc->sec_desc); + } + } + return 1; +} + int nt_delete_reg_key(REG_KEY *key) { @@ -573,6 +652,16 @@ int nt_delete_reg_key(REG_KEY *key) * we can reduce the number of SDs in use. */ +/* + * Code to parse registry specification from command line or files + * + * Format: + * [cmd:]key:type:value + * + * cmd = a|d|c|add|delete|change|as|ds|cs + * + */ + /* * Load and unload a registry file. @@ -815,6 +904,77 @@ char *val_to_str(unsigned int val, VAL_STR *val_array) } +/* + * Convert from UniCode to Ascii ... Does not take into account other lang + * Restrict by ascii_max if > 0 + */ +int uni_to_ascii(unsigned char *uni, unsigned char *ascii, int ascii_max, + int uni_max) +{ + int i = 0; + + while (i < ascii_max && !(!uni[i*2] && !uni[i*2+1])) { + if (uni_max > 0 && (i*2) >= uni_max) break; + ascii[i] = uni[i*2]; + i++; + + } + + ascii[i] = '\0'; + + return i; +} + +/* + * Convert a data value to a string for display + */ +int data_to_ascii(unsigned char *datap, int len, int type, char *ascii, int ascii_max) +{ + unsigned char *asciip; + int i; + + switch (type) { + case REG_TYPE_REGSZ: + fprintf(stderr, "Len: %d\n", len); + return uni_to_ascii(datap, ascii, len, ascii_max); + break; + + case REG_TYPE_EXPANDSZ: + return uni_to_ascii(datap, ascii, len, ascii_max); + break; + + case REG_TYPE_BIN: + asciip = ascii; + for (i=0; (i 0) + *asciip = ' '; asciip++; + } + *asciip = '\0'; + return ((int)asciip - (int)ascii); + break; + + case REG_TYPE_DWORD: + if (*(int *)datap == 0) + return snprintf(ascii, ascii_max, "0"); + else + return snprintf(ascii, ascii_max, "0x%x", *(int *)datap); + break; + + case REG_TYPE_MULTISZ: + + break; + + default: + return 0; + break; + } + + return len; + +} + REG_KEY *nt_get_key_tree(REGF *regf, NK_HDR *nk_hdr, int size); int nt_set_regf_input_file(REGF *regf, char *filename) @@ -861,27 +1021,6 @@ int nt_free_regf(REGF *regf) return 1; } -/* - * Convert from UniCode to Ascii ... Does not take into account other lang - * Restrict by ascii_max if > 0 - */ -int uni_to_ascii(unsigned char *uni, unsigned char *ascii, int ascii_max, - int uni_max) -{ - int i = 0; - - while (i < ascii_max && !(!uni[i*2] && !uni[i*2+1])) { - if (uni_max > 0 && (i*2) >= uni_max) break; - ascii[i] = uni[i*2]; - i++; - - } - - ascii[i] = '\0'; - - return i; -} - /* Get the header of the registry. Return a pointer to the structure * If the mmap'd area has not been allocated, then mmap the input file */ @@ -1284,6 +1423,7 @@ VAL_KEY *process_vk(REGF *regf, VK_HDR *vk_hdr, int size) bcopy(&dat_off, dtmp, dat_len); } + tmp->data_len = dat_len; } val_type = val_to_str(dat_type, reg_type_names); @@ -1657,10 +1797,15 @@ int print_sec(SEC_DESC *sec_desc) int print_val(char *path, char *val_name, int val_type, int data_len, void *data_blk, int terminal, int first, int last) { + char data_asc[1024]; + + bzero(data_asc, sizeof(data_asc)); if (!terminal && first) fprintf(stdout, "%s\n", path); - fprintf(stdout, " %s : %s : \n", (val_name?val_name:""), - val_to_str(val_type, reg_type_names)); + data_to_ascii((unsigned char *)data_blk, data_len, val_type, data_asc, + sizeof(data_asc) - 1); + fprintf(stdout, " %s : %s : %s\n", (val_name?val_name:""), + val_to_str(val_type, reg_type_names), data_asc); return 1; } -- cgit From b1cfbb0f69e9aeefdc037760e5738c3c4bc4fc05 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 17 Dec 2002 21:35:56 +0000 Subject: * fix memory leak when constructing an driver_level_6 structure and no dependent files (working on smbd memory leak). No CR# yet. (This used to be commit f017fa7c478f87165b7b6aa83059fe6fad29ac15) --- source3/rpc_server/srv_spoolss_nt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 6dd4352cbc..b5c5749f3c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4928,8 +4928,10 @@ static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, char *s pstrcpy( line, v ); DEBUGADD(6,("%d:%s:%d\n", i, line, strlen(line))); + + /* add one extra unit16 for the second terminating NULL */ - if ( (tuary=Realloc(*uni_array, (j+strlen(line)+2)*sizeof(uint16))) == NULL ) { + if ( (tuary=Realloc(*uni_array, (j+1+strlen(line)+2)*sizeof(uint16))) == NULL ) { DEBUG(2,("init_unistr_array: Realloc error\n" )); return 0; } else @@ -4943,6 +4945,9 @@ static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, char *s } if (*uni_array) { + /* special case for ""; we need to add both NULL's here */ + if (!j) + (*uni_array)[j++]=0x0000; (*uni_array)[j]=0x0000; } @@ -5172,6 +5177,7 @@ static WERROR construct_printer_driver_info_6(DRIVER_INFO_6 *info, int snum, fill_printer_driver_info_6(info, driver, servername); free_a_printer(&printer,2); + free_a_printer_driver(driver, 3); return WERR_OK; } -- cgit From 2134817842a8fceea9e922e00272c3adef864f9a Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 17 Dec 2002 21:45:50 +0000 Subject: fix make proto to work with SGI smake (This used to be commit 773e5af6eb61fc38f8e45ea0a2afd6922cc71fd5) --- source3/Makefile.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 8617bdeed6..a13197823c 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -1114,10 +1114,15 @@ include/tdbsam2_parse_info.h: # make sure these commands are executed in sequence even for a # parallel make. headers: - $(MAKE) delheaders include/proto.h include/build_env.h \ - include/wrepld_proto.h nsswitch/winbindd_proto.h \ - web/swat_proto.h client/client_proto.h \ - utils/net_proto.h include/tdbsam2_parse_info.h + $(MAKE) delheaders; \ + $(MAKE) include/proto.h; \ + $(MAKE) include/build_env.h; \ + $(MAKE) include/wrepld_proto.h; \ + $(MAKE) nsswitch/winbindd_proto.h; \ + $(MAKE) web/swat_proto.h; \ + $(MAKE) client/client_proto.h; \ + $(MAKE) utils/net_proto.h; \ + $(MAKE) include/tdbsam2_parse_info.h proto: headers -- cgit From 846b50cd417b392288727ecf948ba4df30a90e6e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 17 Dec 2002 22:53:56 +0000 Subject: app_head merge for get_friendly_nt_err() (This used to be commit 3ceff08eb75ecd70dcf10d033c7451d87b659c0b) --- source3/libsmb/nterr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c index 4bb21efaa7..e494995f86 100644 --- a/source3/libsmb/nterr.c +++ b/source3/libsmb/nterr.c @@ -602,9 +602,9 @@ char *get_friendly_nt_error_msg(NTSTATUS nt_code) int idx = 0; while (nt_err_desc[idx].nt_errstr != NULL) { - if (NT_STATUS_V(nt_errs[idx].nt_errcode) == NT_STATUS_V(nt_code)) + if (NT_STATUS_V(nt_err_desc[idx].nt_errcode) == NT_STATUS_V(nt_code)) { - return nt_errs[idx].nt_errstr; + return nt_err_desc[idx].nt_errstr; } idx++; } -- cgit From c26dd35c76e671bd566c709510aa97deb1bf1192 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 19 Dec 2002 19:56:31 +0000 Subject: merge from 2.2 actually print args for %g and %e (This used to be commit 47a0ba53fdf52fb4d269b1ff95491e73e47423be) --- source3/lib/snprintf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c index cd1e63ce59..1eae2f09b9 100644 --- a/source3/lib/snprintf.c +++ b/source3/lib/snprintf.c @@ -341,6 +341,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'G': flags |= DP_F_UP; @@ -349,6 +350,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args fvalue = va_arg (args, LDOUBLE); else fvalue = va_arg (args, double); + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); break; case 'c': dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); -- cgit From c52a34693d8bb007b246a365aa1ca7502156d9d2 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 19 Dec 2002 20:23:45 +0000 Subject: merge from 2.2 fix for smbclient large files (This used to be commit 723c4caf64c56b78052c52fec78c7143ec19e944) --- source3/client/clitar.c | 36 ++++++++++++++++++------------------ source3/libsmb/clireadwrite.c | 10 +++++++++- 2 files changed, 27 insertions(+), 19 deletions(-) (limited to 'source3') diff --git a/source3/client/clitar.c b/source3/client/clitar.c index bf26beb652..bf4b6e592a 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -121,11 +121,11 @@ extern int get_total_size; static int blocksize=20; static int tarhandle; -static void writetarheader(int f, char *aname, int size, time_t mtime, +static void writetarheader(int f, char *aname, SMB_BIG_UINT size, time_t mtime, char *amode, unsigned char ftype); static void do_atar(char *rname,char *lname,file_info *finfo1); static void do_tar(file_info *finfo); -static void oct_it(long value, int ndgs, char *p); +static void oct_it(SMB_BIG_UINT value, int ndgs, char *p); static void fixtarname(char *tptr, char *fp, int l); static int dotarbuf(int f, char *b, int n); static void dozerobuf(int f, int n); @@ -164,14 +164,14 @@ static char *string_create_s(int size) /**************************************************************************** Write a tar header to buffer ****************************************************************************/ -static void writetarheader(int f, char *aname, int size, time_t mtime, +static void writetarheader(int f, char *aname, SMB_BIG_UINT size, time_t mtime, char *amode, unsigned char ftype) { union hblock hb; int i, chk, l; char *jp; - DEBUG(5, ("WriteTarHdr, Type = %c, Size= %i, Name = %s\n", ftype, size, aname)); + DEBUG(5, ("WriteTarHdr, Type = %c, Size= %.0f, Name = %s\n", ftype, (double)size, aname)); memset(hb.dummy, 0, sizeof(hb.dummy)); @@ -203,17 +203,17 @@ static void writetarheader(int f, char *aname, int size, time_t mtime, hb.dbuf.name[NAMSIZ-1]='\0'; safe_strcpy(hb.dbuf.mode, amode, strlen(amode)); - oct_it(0L, 8, hb.dbuf.uid); - oct_it(0L, 8, hb.dbuf.gid); - oct_it((long) size, 13, hb.dbuf.size); - oct_it((long) mtime, 13, hb.dbuf.mtime); + oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.uid); + oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.gid); + oct_it((SMB_BIG_UINT) size, 13, hb.dbuf.size); + oct_it((SMB_BIG_UINT) mtime, 13, hb.dbuf.mtime); memcpy(hb.dbuf.chksum, " ", sizeof(hb.dbuf.chksum)); memset(hb.dbuf.linkname, 0, NAMSIZ); hb.dbuf.linkflag=ftype; for (chk=0, i=sizeof(hb.dummy), jp=hb.dummy; --i>=0;) chk+=(0xFF & *jp++); - oct_it((long) chk, 8, hb.dbuf.chksum); + oct_it((SMB_BIG_UINT) chk, 8, hb.dbuf.chksum); hb.dbuf.chksum[6] = '\0'; (void) dotarbuf(f, hb.dummy, sizeof(hb.dummy)); @@ -427,7 +427,7 @@ static void fixtarname(char *tptr, char *fp, int l) /**************************************************************************** Convert from decimal to octal string ****************************************************************************/ -static void oct_it (long value, int ndgs, char *p) +static void oct_it (SMB_BIG_UINT value, int ndgs, char *p) { /* Converts long to octal string, pads with leading zeros */ @@ -598,7 +598,7 @@ append one remote file to the tar file static void do_atar(char *rname,char *lname,file_info *finfo1) { int fnum; - uint32 nread=0; + SMB_BIG_UINT nread=0; char ftype; file_info2 finfo; BOOL close_done = False; @@ -688,9 +688,9 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) } else { - DEBUG(3,("getting file %s of size %d bytes as a tar file %s", + DEBUG(3,("getting file %s of size %.0f bytes as a tar file %s", finfo.name, - (int)finfo.size, + (double)finfo.size, lname)); /* write a tar header, don't bother with mode - just set to 100644 */ @@ -698,7 +698,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) while (nread < finfo.size && !close_done) { - DEBUG(3,("nread=%d\n",nread)); + DEBUG(3,("nread=%.0f\n",(double)nread)); datalen = cli_read(cli, fnum, data, nread, read_size); @@ -715,7 +715,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) if (nread > finfo.size) { datalen -= nread - finfo.size; - DEBUG(0,("File size change - truncating %s to %d bytes\n", finfo.name, (int)finfo.size)); + DEBUG(0,("File size change - truncating %s to %.0f bytes\n", finfo.name, (double)finfo.size)); } /* add received bits of file to buffer - dotarbuf will @@ -735,7 +735,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) /* pad tar file with zero's if we couldn't get entire file */ if (nread < finfo.size) { - DEBUG(0, ("Didn't get entire file. size=%d, nread=%d\n", (int)finfo.size, (int)nread)); + DEBUG(0, ("Didn't get entire file. size=%.0f, nread=%d\n", (double)finfo.size, (int)nread)); if (padit(data, sizeof(data), finfo.size - nread)) DEBUG(0,("Error writing tar file - %s\n", strerror(errno))); } @@ -768,8 +768,8 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) if (tar_noisy) { - DEBUG(0, ("%10d (%7.1f kb/s) %s\n", - (int)finfo.size, finfo.size / MAX(0.001, (1.024*this_time)), + DEBUG(0, ("%12.0f (%7.1f kb/s) %s\n", + (double)finfo.size, finfo.size / MAX(0.001, (1.024*this_time)), finfo.name)); } diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 38e8aac42a..7780c93cc4 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -29,10 +29,15 @@ Issue a single SMBread and don't wait for a reply. static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset, size_t size, int i) { + BOOL bigoffset = False; + memset(cli->outbuf,'\0',smb_size); memset(cli->inbuf,'\0',smb_size); - set_message(cli->outbuf,10,0,True); + if ((SMB_BIG_UINT)offset >> 32) + bigoffset = True; + + set_message(cli->outbuf,bigoffset ? 12 : 10,0,True); SCVAL(cli->outbuf,smb_com,SMBreadX); SSVAL(cli->outbuf,smb_tid,cli->cnum); @@ -45,6 +50,9 @@ static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset, SSVAL(cli->outbuf,smb_vwv6,size); SSVAL(cli->outbuf,smb_mid,cli->mid + i); + if (bigoffset) + SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0xffffffff); + return cli_send_smb(cli); } -- cgit From 574c676c94eb3c9eb3b96e94a17bc4313eee7754 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 19 Dec 2002 22:14:53 +0000 Subject: Protect nmbd against malformed reply packets. Some reports on the lists showing these. Jeremy. (This used to be commit 65d5bf65c439aee1450e330a9f2bd829d9b2c2d0) --- source3/nmbd/nmbd_namequery.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nmbd/nmbd_namequery.c b/source3/nmbd/nmbd_namequery.c index 7a820a7148..8995e9ac52 100644 --- a/source3/nmbd/nmbd_namequery.c +++ b/source3/nmbd/nmbd_namequery.c @@ -81,6 +81,14 @@ static void query_name_response( struct subnet_record *subrec, } else { + if (!nmb->answers) + { + dbgtext( "query_name_response: On subnet %s ", subrec->subnet_name ); + dbgtext( "IP %s ", inet_ntoa(p->ip) ); + dbgtext( "returned a success response with no answer\n" ); + return; + } + success = True; putip((char *)&answer_ip,&nmb->answers->rdata[2]); @@ -102,7 +110,8 @@ static void query_name_response( struct subnet_record *subrec, { if( DEBUGLVL( 0 ) ) { - putip( (char *)&answer_ip, &nmb->answers->rdata[2] ); + if (nmb->answers) + putip( (char *)&answer_ip, &nmb->answers->rdata[2] ); dbgtext( "query_name_response: " ); dbgtext( "Multiple (%d) responses ", rrec->num_msgs ); dbgtext( "received for a query on subnet %s ", subrec->subnet_name ); -- cgit From 45a6532727888c710d537c6e1e03466af2a87881 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 20 Dec 2002 01:07:09 +0000 Subject: Fixed bug in debug statement when tconX fails. (This used to be commit a2159610b9d38cc7cfa7cb877ccee816cd2206b8) --- source3/libsmb/cliconnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 584ad15174..b758af41c4 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1258,8 +1258,8 @@ again: if (service) { if (!cli_send_tconX(cli, service, service_type, password, strlen(password)+1)) { - DEBUG(1,("failed tcon_X with %s\n", nt_errstr(nt_status))); nt_status = cli_nt_error(cli); + DEBUG(1,("failed tcon_X with %s\n", nt_errstr(nt_status))); cli_shutdown(cli); if (NT_STATUS_IS_OK(nt_status)) { nt_status = NT_STATUS_UNSUCCESSFUL; -- cgit From 7f23546730e49569d41a5edd0c47bb559c4f812d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 20 Dec 2002 20:23:06 +0000 Subject: Forward port the change to talloc_init() to make all talloc contexts named. Ensure we can query them. Jeremy. (This used to be commit 842e08e52a665ae678eea239759bb2de1a0d7b33) --- source3/auth/auth.c | 8 ++++---- source3/include/talloc.h | 2 +- source3/lib/talloc.c | 6 +++--- source3/lib/tallocmsg.c | 2 +- source3/libads/ldap.c | 14 +++++++------- source3/libads/ldap_user.c | 4 ++-- source3/libsmb/clientgen.c | 2 +- source3/libsmb/clisecdesc.c | 2 +- source3/locking/posix.c | 4 ++-- source3/nmbd/nmbd.c | 20 +++++++++++++++++++ source3/nsswitch/winbindd.c | 20 +++++++++++++++++++ source3/nsswitch/winbindd_ads.c | 2 +- source3/nsswitch/winbindd_group.c | 6 +++--- source3/nsswitch/winbindd_pam.c | 4 ++-- source3/nsswitch/winbindd_rpc.c | 12 ++++++------ source3/nsswitch/winbindd_user.c | 8 ++++---- source3/nsswitch/winbindd_util.c | 4 ++-- source3/param/loadparm.c | 2 +- source3/passdb/passdb.c | 2 +- source3/passdb/pdb_interface.c | 2 +- source3/printing/notify.c | 2 +- source3/printing/nt_printing.c | 8 ++++---- source3/registry/reg_objects.c | 4 ++-- source3/rpc_parse/parse_misc.c | 2 +- source3/rpc_server/srv_pipe_hnd.c | 4 ++-- source3/rpc_server/srv_samr_nt.c | 2 +- source3/rpc_server/srv_spoolss_nt.c | 2 +- source3/rpc_server/srv_srvsvc_nt.c | 4 ++-- source3/rpcclient/cmd_samr.c | 2 +- source3/rpcclient/rpcclient.c | 4 ++-- source3/smbd/nttrans.c | 4 ++-- source3/smbd/server.c | 31 +++++++++++++++++++++++------- source3/torture/vfstest.c | 2 +- source3/utils/net_ads.c | 4 ++-- source3/utils/net_rpc.c | 12 ++++++------ source3/utils/net_rpc_join.c | 2 +- source3/utils/net_rpc_samsync.c | 6 +++--- source3/utils/smbcacls.c | 2 +- source3/utils/smbcontrol.c | 38 +++++++++++++++++++++++++++++++++++++ source3/wrepld/server.c | 2 +- 40 files changed, 179 insertions(+), 84 deletions(-) (limited to 'source3') diff --git a/source3/auth/auth.c b/source3/auth/auth.c index d730e39f44..dce14ed468 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -74,9 +74,9 @@ static const uint8 *get_ntlm_challenge(struct auth_context *auth_context) continue; } - mem_ctx = talloc_init_named("auth_get_challenge for module %s", auth_method->name); + mem_ctx = talloc_init("auth_get_challenge for module %s", auth_method->name); if (!mem_ctx) { - smb_panic("talloc_init_named() failed!"); + smb_panic("talloc_init() failed!"); } challenge = auth_method->get_chal(auth_context, &auth_method->private_data, mem_ctx); @@ -211,7 +211,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context, return NT_STATUS_LOGON_FAILURE; for (auth_method = auth_context->auth_method_list;auth_method; auth_method = auth_method->next) { - mem_ctx = talloc_init_named("%s authentication for user %s\\%s", auth_method->name, + mem_ctx = talloc_init("%s authentication for user %s\\%s", auth_method->name, user_info->domain.str, user_info->smb_name.str); nt_status = auth_method->auth(auth_context, auth_method->private_data, mem_ctx, user_info, server_info); @@ -290,7 +290,7 @@ static NTSTATUS make_auth_context(struct auth_context **auth_context) { TALLOC_CTX *mem_ctx; - mem_ctx = talloc_init_named("authentication context"); + mem_ctx = talloc_init("authentication context"); *auth_context = talloc(mem_ctx, sizeof(**auth_context)); if (!*auth_context) { diff --git a/source3/include/talloc.h b/source3/include/talloc.h index 64a5883041..4badddbb88 100644 --- a/source3/include/talloc.h +++ b/source3/include/talloc.h @@ -32,7 +32,7 @@ **/ typedef struct talloc_ctx TALLOC_CTX; -TALLOC_CTX *talloc_init_named(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2); +TALLOC_CTX *talloc_init(char const *fmt, ...) PRINTF_ATTRIBUTE(1, 2); char *talloc_vasprintf(TALLOC_CTX *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2, 0); diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 5fffe58f9f..f0c13753b5 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -117,7 +117,7 @@ static void talloc_disenroll(TALLOC_CTX *t) /** Create a new talloc context. **/ -TALLOC_CTX *talloc_init(void) +static TALLOC_CTX *talloc_init_internal(void) { TALLOC_CTX *t; @@ -139,12 +139,12 @@ TALLOC_CTX *talloc_init(void) * Please call this in preference to talloc_init(). **/ - TALLOC_CTX *talloc_init_named(char const *fmt, ...) + TALLOC_CTX *talloc_init(char const *fmt, ...) { TALLOC_CTX *t; va_list ap; - t = talloc_init(); + t = talloc_init_internal(); if (t && fmt) { /* * t->name must not be talloced. diff --git a/source3/lib/tallocmsg.c b/source3/lib/tallocmsg.c index 608cdad452..bbe1ee60a4 100644 --- a/source3/lib/tallocmsg.c +++ b/source3/lib/tallocmsg.c @@ -34,7 +34,7 @@ void msg_pool_usage(int msg_type, pid_t src_pid, void *UNUSED(buf), size_t UNUSED(len)) { char *reply; - TALLOC_CTX *reply_pool = talloc_init_named("msg_pool_usage"); + TALLOC_CTX *reply_pool = talloc_init("msg_pool_usage"); SMB_ASSERT(msg_type == MSG_REQ_POOL_USAGE); diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index af9a6451fe..97ccf76983 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -420,7 +420,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, *res = NULL; - if (!(ctx = talloc_init())) + if (!(ctx = talloc_init("ads_do_paged_search"))) return ADS_ERROR(LDAP_NO_MEMORY); /* 0 means the conversion worked but the result was empty @@ -642,7 +642,7 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, char *utf8_exp, *utf8_path, **search_attrs = NULL; TALLOC_CTX *ctx; - if (!(ctx = talloc_init())) { + if (!(ctx = talloc_init("ads_do_search"))) { DEBUG(1,("ads_do_search: talloc_init() failed!")); return ADS_ERROR(LDAP_NO_MEMORY); } @@ -1031,7 +1031,7 @@ static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *hostname, char *psp; unsigned acct_control; - if (!(ctx = talloc_init_named("machine_account"))) + if (!(ctx = talloc_init("machine_account"))) return ADS_ERROR(LDAP_NO_MEMORY); ret = ADS_ERROR(LDAP_NO_MEMORY); @@ -1144,7 +1144,7 @@ static void dump_sd(const char *filed, struct berval **values) SEC_DESC *psd = 0; TALLOC_CTX *ctx = 0; - if (!(ctx = talloc_init_named("sec_io_desc"))) + if (!(ctx = talloc_init("sec_io_desc"))) return; /* prepare data */ @@ -1246,7 +1246,7 @@ void ads_process_results(ADS_STRUCT *ads, void *res, void *msg; TALLOC_CTX *ctx; - if (!(ctx = talloc_init())) + if (!(ctx = talloc_init("ads_process_results"))) return; for (msg = ads_first_entry(ads, res); msg; @@ -1429,7 +1429,7 @@ ADS_STATUS ads_set_machine_sd(ADS_STRUCT *ads, const char *hostname, char *dn) msg = ads_first_entry(ads, res); ads_pull_sid(ads, msg, attrs[1], &sid); - if (!(ctx = talloc_init_named("sec_io_desc"))) { + if (!(ctx = talloc_init("sec_io_desc"))) { ret = ADS_ERROR(LDAP_NO_MEMORY); goto ads_set_sd_error; } @@ -1785,7 +1785,7 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads) char *timestr; TALLOC_CTX *ctx; - if (!(ctx = talloc_init())) { + if (!(ctx = talloc_init("ads_server_info"))) { return ADS_ERROR(LDAP_NO_MEMORY); } diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c index b6fef24b5c..de19e2da5e 100644 --- a/source3/libads/ldap_user.c +++ b/source3/libads/ldap_user.c @@ -50,7 +50,7 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user, if (fullname && *fullname) name = fullname; else name = user; - if (!(ctx = talloc_init_named("ads_add_user_acct"))) + if (!(ctx = talloc_init("ads_add_user_acct"))) return ADS_ERROR(LDAP_NO_MEMORY); status = ADS_ERROR(LDAP_NO_MEMORY); @@ -88,7 +88,7 @@ ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group, char *new_dn; const char *objectClass[] = {"top", "group", NULL}; - if (!(ctx = talloc_init_named("ads_add_group_acct"))) + if (!(ctx = talloc_init("ads_add_group_acct"))) return ADS_ERROR(LDAP_NO_MEMORY); status = ADS_ERROR(LDAP_NO_MEMORY); diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 28480043b9..c843d49d27 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -262,7 +262,7 @@ struct cli_state *cli_initialise(struct cli_state *cli) if (!cli->outbuf || !cli->inbuf) goto error; - if ((cli->mem_ctx = talloc_init_named("cli based talloc")) == NULL) + if ((cli->mem_ctx = talloc_init("cli based talloc")) == NULL) goto error; memset(cli->outbuf, 0, cli->bufsize); diff --git a/source3/libsmb/clisecdesc.c b/source3/libsmb/clisecdesc.c index 5de67b1e05..7dd2747ff6 100644 --- a/source3/libsmb/clisecdesc.c +++ b/source3/libsmb/clisecdesc.c @@ -83,7 +83,7 @@ BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd) prs_struct pd; BOOL ret = False; - if ((mem_ctx = talloc_init()) == NULL) { + if ((mem_ctx = talloc_init("cli_set_secdesc")) == NULL) { DEBUG(0,("talloc_init failed.\n")); goto cleanup; } diff --git a/source3/locking/posix.c b/source3/locking/posix.c index 94055de2b0..fcf19d21cf 100644 --- a/source3/locking/posix.c +++ b/source3/locking/posix.c @@ -1003,7 +1003,7 @@ BOOL set_posix_lock(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u_cou * semantics that if a write lock is added, then it will be first in the array. */ - if ((l_ctx = talloc_init()) == NULL) { + if ((l_ctx = talloc_init("set_posix_lock")) == NULL) { DEBUG(0,("set_posix_lock: unable to init talloc context.\n")); return True; /* Not a fatal error. */ } @@ -1149,7 +1149,7 @@ BOOL release_posix_lock(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u } } - if ((ul_ctx = talloc_init()) == NULL) { + if ((ul_ctx = talloc_init("release_posix_lock")) == NULL) { DEBUG(0,("release_posix_lock: unable to init talloc context.\n")); return True; /* Not a fatal error. */ } diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 5987d70a45..988127e431 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -95,6 +95,25 @@ static void sig_hup(int sig) sys_select_signal(); } +/******************************************************************* + Print out all talloc memory info. +********************************************************************/ + +void return_all_talloc_info(int msg_type, pid_t src_pid, void *buf, size_t len) +{ + TALLOC_CTX *ctx = talloc_init("info context"); + char *info = NULL; + + if (!ctx) + return; + + info = talloc_describe_all(ctx); + if (info) + DEBUG(10,(info)); + message_send_pid(src_pid, MSG_TALLOC_USAGE, info, info ? strlen(info) + 1 : 0, True); + talloc_destroy(ctx); +} + #if DUMP_CORE /**************************************************************************** ** Prepare to dump a core file - carefully! @@ -682,6 +701,7 @@ static BOOL open_sockets(BOOL isdaemon, int port) message_register(MSG_FORCE_ELECTION, nmbd_message_election); message_register(MSG_WINS_NEW_ENTRY, nmbd_wins_new_entry); message_register(MSG_SHUTDOWN, nmbd_terminate); + message_register(MSG_REQ_TALLOC_USAGE, return_all_talloc_info); DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) ); diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index b4d1773e9c..61e585902c 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -58,6 +58,25 @@ static BOOL reload_services_file(BOOL test) return(ret); } +/******************************************************************* + Print out all talloc memory info. +********************************************************************/ + +void return_all_talloc_info(int msg_type, pid_t src_pid, void *buf, size_t len) +{ + TALLOC_CTX *ctx = talloc_init("info context"); + char *info = NULL; + + if (!ctx) + return; + + info = talloc_describe_all(ctx); + if (info) + DEBUG(10,(info)); + message_send_pid(src_pid, MSG_TALLOC_USAGE, info, info ? strlen(info) + 1: 0, True); + talloc_destroy(ctx); +} + #if DUMP_CORE /**************************************************************************** ** @@ -864,6 +883,7 @@ static void usage(void) } register_msg_pool_usage(); + message_register(MSG_REQ_TALLOC_USAGE, return_all_talloc_info); /* Loop waiting for requests */ diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 709b134c45..261c2f2237 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -677,7 +677,7 @@ static NTSTATUS alternate_name(struct winbindd_domain *domain) ads = ads_cached_connection(domain); if (!ads) return NT_STATUS_UNSUCCESSFUL; - if (!(ctx = talloc_init_named("alternate_name"))) { + if (!(ctx = talloc_init("alternate_name"))) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index ab6268583f..6b2f05f436 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -64,7 +64,7 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx; NTSTATUS status; - if (!(mem_ctx = talloc_init_named("fill_grent_mem(%s)", domain->name))) + if (!(mem_ctx = talloc_init("fill_grent_mem(%s)", domain->name))) return False; /* Initialise group membership information */ @@ -408,7 +408,7 @@ static BOOL get_sam_group_entries(struct getent_state *ent) if (ent->got_sam_entries) return False; - if (!(mem_ctx = talloc_init_named("get_sam_group_entries(%s)", + if (!(mem_ctx = talloc_init("get_sam_group_entries(%s)", ent->domain_name))) { DEBUG(1, ("get_sam_group_entries: could not create talloc context!\n")); return False; @@ -820,7 +820,7 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: getgroups %s\n", state->pid, state->request.data.username)); - if (!(mem_ctx = talloc_init_named("winbindd_getgroups(%s)", + if (!(mem_ctx = talloc_init("winbindd_getgroups(%s)", state->request.data.username))) return WINBINDD_ERROR; diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 733ccb4cd6..c5b68ea058 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -77,7 +77,7 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: pam auth %s\n", state->pid, state->request.data.auth.user)); - if (!(mem_ctx = talloc_init_named("winbind pam auth for %s", state->request.data.auth.user))) { + if (!(mem_ctx = talloc_init("winbind pam auth for %s", state->request.data.auth.user))) { DEBUG(0, ("winbindd_pam_auth: could not talloc_init()!\n")); result = NT_STATUS_NO_MEMORY; goto done; @@ -179,7 +179,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) /* Ensure null termination */ state->request.data.auth_crap.domain[sizeof(state->request.data.auth_crap.domain)-1]='\0'; - if (!(mem_ctx = talloc_init_named("winbind pam auth crap for (utf8) %s", state->request.data.auth_crap.user))) { + if (!(mem_ctx = talloc_init("winbind pam auth crap for (utf8) %s", state->request.data.auth_crap.user))) { DEBUG(0, ("winbindd_pam_auth_crap: could not talloc_init()!\n")); result = NT_STATUS_NO_MEMORY; goto done; diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index d3a418027d..ddd2fc4946 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -71,7 +71,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, ctr.sam.info1 = &info1; - ctx2 = talloc_init_named("winbindd dispinfo"); + ctx2 = talloc_init("winbindd dispinfo"); if (!ctx2) { result = NT_STATUS_NO_MEMORY; goto done; @@ -152,7 +152,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, uint32 count = 0, start = *num_entries; TALLOC_CTX *mem_ctx2; - mem_ctx2 = talloc_init_named("enum_dom_groups[rpc]"); + mem_ctx2 = talloc_init("enum_dom_groups[rpc]"); status = cli_samr_enum_dom_groups(hnd->cli, mem_ctx2, &dom_pol, &start, @@ -212,7 +212,7 @@ static NTSTATUS enum_local_groups(struct winbindd_domain *domain, uint32 count = 0, start = *num_entries; TALLOC_CTX *mem_ctx2; - mem_ctx2 = talloc_init_named("enum_dom_local_groups[rpc]"); + mem_ctx2 = talloc_init("enum_dom_local_groups[rpc]"); result = cli_samr_enum_als_groups( hnd->cli, mem_ctx2, &dom_pol, &start, 0xFFFF, &info2, &count); @@ -257,7 +257,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain, DEBUG(3,("rpc: name_to_sid name=%s\n", name)); - if (!(mem_ctx = talloc_init_named("name_to_sid[rpc] for [%s]\\[%s]", domain->name, name))) { + if (!(mem_ctx = talloc_init("name_to_sid[rpc] for [%s]\\[%s]", domain->name, name))) { DEBUG(0, ("talloc_init failed!\n")); return NT_STATUS_NO_MEMORY; } @@ -587,7 +587,7 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq) *seq = DOM_SEQUENCE_NONE; - if (!(mem_ctx = talloc_init_named("sequence_number[rpc]"))) + if (!(mem_ctx = talloc_init("sequence_number[rpc]"))) return NT_STATUS_NO_MEMORY; /* Get sam handle */ @@ -667,7 +667,7 @@ static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid) DEBUG(3,("rpc: domain_sid\n")); - if (!(mem_ctx = talloc_init_named("domain_sid[rpc]"))) + if (!(mem_ctx = talloc_init("domain_sid[rpc]"))) return NT_STATUS_NO_MEMORY; /* Get sam handle */ diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index bb281463ce..5ae2fe7870 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -137,7 +137,7 @@ enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state) from the winbind_lookup_by_name() call and use it in a winbind_lookup_userinfo() */ - if (!(mem_ctx = talloc_init_named("winbindd_getpwnam([%s]\\[%s])", + if (!(mem_ctx = talloc_init("winbindd_getpwnam([%s]\\[%s])", name_domain, name_user))) { DEBUG(1, ("out of memory\n")); return WINBINDD_ERROR; @@ -217,7 +217,7 @@ enum winbindd_result winbindd_getpwuid(struct winbindd_cli_state *state) /* Get some user info */ - if (!(mem_ctx = talloc_init_named("winbind_getpwuid(%d)", + if (!(mem_ctx = talloc_init("winbind_getpwuid(%d)", state->request.data.uid))) { DEBUG(1, ("out of memory\n")); @@ -336,7 +336,7 @@ static BOOL get_sam_user_entries(struct getent_state *ent) if (ent->num_sam_entries) return False; - if (!(mem_ctx = talloc_init_named("get_sam_user_entries(%s)", + if (!(mem_ctx = talloc_init("get_sam_user_entries(%s)", ent->domain_name))) return False; @@ -531,7 +531,7 @@ enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state) DEBUG(3, ("[%5d]: list users\n", state->pid)); - if (!(mem_ctx = talloc_init_named("winbindd_list_users"))) + if (!(mem_ctx = talloc_init("winbindd_list_users"))) return WINBINDD_ERROR; /* Enumerate over trusted domains */ diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index c1bb5cec7c..f5b4bb4497 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -166,7 +166,7 @@ void rescan_trusted_domains(void) DEBUG(1, ("scanning trusted domain list\n")); - if (!(mem_ctx = talloc_init_named("init_domain_list"))) + if (!(mem_ctx = talloc_init("init_domain_list"))) return; for (domain = _domain_list; domain; domain = domain->next) { @@ -338,7 +338,7 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, /* Lookup name */ - if (!(mem_ctx = talloc_init_named("winbindd_lookup_name_by_sid"))) + if (!(mem_ctx = talloc_init("winbindd_lookup_name_by_sid"))) return False; result = domain->methods->sid_to_name(domain, mem_ctx, sid, &names, type); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 009a94ff7f..02f120b534 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1478,7 +1478,7 @@ static char *lp_string(const char *s) #endif if (!lp_talloc) - lp_talloc = talloc_init_named("lp_talloc"); + lp_talloc = talloc_init("lp_talloc"); ret = (char *)talloc(lp_talloc, len + 100); /* leave room for substitution */ diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index ef1c1180dd..ed5ddda4da 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -139,7 +139,7 @@ NTSTATUS pdb_init_sam(SAM_ACCOUNT **user) TALLOC_CTX *mem_ctx; NTSTATUS nt_status; - mem_ctx = talloc_init_named("passdb internal SAM_ACCOUNT allocation"); + mem_ctx = talloc_init("passdb internal SAM_ACCOUNT allocation"); if (!mem_ctx) { DEBUG(0,("pdb_init_sam: error while doing talloc_init()\n")); diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 79ce598149..891a29148f 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -465,7 +465,7 @@ static NTSTATUS make_pdb_context(struct pdb_context **context) { TALLOC_CTX *mem_ctx; - mem_ctx = talloc_init_named("pdb_context internal allocation context"); + mem_ctx = talloc_init("pdb_context internal allocation context"); if (!mem_ctx) { DEBUG(0, ("make_pdb_context: talloc init failed!\n")); diff --git a/source3/printing/notify.c b/source3/printing/notify.c index f55dbff47e..a89eb3f13c 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -146,7 +146,7 @@ static void send_spoolss_notify2_msg(struct spoolss_notify_msg *msg) return; if (!send_ctx) - send_ctx = talloc_init_named("print notify queue"); + send_ctx = talloc_init("print notify queue"); if (!send_ctx) goto fail; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index ab01e77c61..31f480a4dd 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2574,7 +2574,7 @@ static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, GUID guid) static WERROR publish_it(NT_PRINTER_INFO_LEVEL *printer) { ADS_STATUS ads_rc; - TALLOC_CTX *ctx = talloc_init(); + TALLOC_CTX *ctx = talloc_init("publish_it"); ADS_MODLIST mods = ads_init_mods(ctx); char *prt_dn = NULL, *srv_dn, **srv_cn; void *res = NULL; @@ -3713,7 +3713,7 @@ static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, uint8 *data, ui * saved to tdb. */ - if ((ctx = talloc_init()) == NULL) + if ((ctx = talloc_init("save_driver_init_2")) == NULL) return WERR_NOMEM; if ((nt_devmode = (NT_DEVICEMODE*)malloc(sizeof(NT_DEVICEMODE))) == NULL) { @@ -4397,7 +4397,7 @@ WERROR nt_printing_setsec(const char *printername, SEC_DESC_BUF *secdesc_ctr) fstring key; WERROR status; - mem_ctx = talloc_init(); + mem_ctx = talloc_init("nt_printing_setsec"); if (mem_ctx == NULL) return WERR_NOMEM; @@ -4744,7 +4744,7 @@ BOOL print_access_check(struct current_user *user, int snum, int access_type) /* Get printer security descriptor */ - if(!(mem_ctx = talloc_init())) { + if(!(mem_ctx = talloc_init("print_access_check"))) { errno = ENOMEM; return False; } diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 663435daca..3289ebfe88 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -33,7 +33,7 @@ void regsubkey_ctr_init( REGSUBKEY_CTR *ctr ) { if ( !ctr->ctx ) - ctr->ctx = talloc_init(); + ctr->ctx = talloc_init("regsubkey_ctr_init for ctr %p", ctr); } /*********************************************************************** @@ -114,7 +114,7 @@ void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr ) void regval_ctr_init( REGVAL_CTR *ctr ) { if ( !ctr->ctx ) - ctr->ctx = talloc_init(); + ctr->ctx = talloc_init("regval_ctr_init for ctr %p", ctr); } /*********************************************************************** diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 5dcb49d399..86dd85066d 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -63,7 +63,7 @@ void main_loop_talloc_free(void) TALLOC_CTX *main_loop_talloc_get(void) { if (!main_loop_talloc) { - main_loop_talloc = talloc_init_named("main loop talloc (mainly parse_misc)"); + main_loop_talloc = talloc_init("main loop talloc (mainly parse_misc)"); if (!main_loop_talloc) smb_panic("main_loop_talloc: malloc fail\n"); } diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 1695419687..6cdb6836eb 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -293,7 +293,7 @@ static void *make_internal_rpc_pipe_p(char *pipe_name, ZERO_STRUCTP(p); - if ((p->mem_ctx = talloc_init()) == NULL) { + if ((p->mem_ctx = talloc_init("pipe %s %p", pipe_name, p)) == NULL) { DEBUG(0,("open_rpc_pipe_p: talloc_init failed.\n")); SAFE_FREE(p); return NULL; @@ -544,7 +544,7 @@ void free_pipe_context(pipes_struct *p) DEBUG(3,("free_pipe_context: destroying talloc pool of size %u\n", talloc_pool_size(p->mem_ctx) )); talloc_destroy_pool(p->mem_ctx); } else { - p->mem_ctx = talloc_init(); + p->mem_ctx = talloc_init("pipe %s %p", p->name, p); if (p->mem_ctx == NULL) p->fault_state = True; } diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index e8474118cd..3e3baedb9a 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -134,7 +134,7 @@ static struct samr_info *get_samr_info_by_sid(DOM_SID *psid) fstrcpy(sid_str,"(NULL)"); } - mem_ctx = talloc_init_named("samr_info for domain sid %s", sid_str); + mem_ctx = talloc_init("samr_info for domain sid %s", sid_str); if ((info = (struct samr_info *)talloc(mem_ctx, sizeof(struct samr_info))) == NULL) return NULL; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index b5c5749f3c..68a2dcb83d 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -776,7 +776,7 @@ static void notify_msg_ctr_init( SPOOLSS_NOTIFY_MSG_CTR *ctr ) if ( !ctr ) return; - ctr->ctx = talloc_init(); + ctr->ctx = talloc_init("notify_msg_ctr_init %p", ctr); return; } diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 0384bb81a3..69f82bb96f 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -237,7 +237,7 @@ static BOOL set_share_security(TALLOC_CTX *ctx, const char *share_name, SEC_DESC fstring key; BOOL ret = False; - mem_ctx = talloc_init(); + mem_ctx = talloc_init("set_share_security"); if (mem_ctx == NULL) return False; @@ -327,7 +327,7 @@ BOOL share_access_check(connection_struct *conn, int snum, user_struct *vuser, u NT_USER_TOKEN *token = NULL; BOOL ret = True; - mem_ctx = talloc_init(); + mem_ctx = talloc_init("share_access_check"); if (mem_ctx == NULL) return False; diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 246e74dc35..5c6308d07c 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1310,7 +1310,7 @@ static NTSTATUS cmd_samr_query_sec_obj(struct cli_state *cli, SEC_DESC_BUF *sec_desc_buf=NULL; BOOL domain = False; - ctx=talloc_init(); + ctx=talloc_init("cmd_samr_query_sec_obj"); if ((argc < 1) || (argc > 2)) { printf("Usage: %s [rid|-d]\n", argv[0]); diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 646a6d9035..02fa91cf26 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -197,7 +197,7 @@ static void fetch_machine_sid(struct cli_state *cli) if (got_domain_sid) return; - if (!(mem_ctx=talloc_init())) + if (!(mem_ctx=talloc_init("fetch_machine_sid"))) { DEBUG(0,("fetch_machine_sid: talloc_init returned NULL!\n")); goto error; @@ -479,7 +479,7 @@ static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry, /* Create mem_ctx */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("do_cmd"))) { DEBUG(0, ("talloc_init() failed\n")); goto done; } diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index bdefa6c4c1..740f450db6 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -985,7 +985,7 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu * Init the parse struct we will unmarshall from. */ - if ((mem_ctx = talloc_init()) == NULL) { + if ((mem_ctx = talloc_init("set_sd")) == NULL) { DEBUG(0,("set_sd: talloc_init failed.\n")); return NT_STATUS_NO_MEMORY; } @@ -1538,7 +1538,7 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, *ppparams = params; - if ((mem_ctx = talloc_init()) == NULL) { + if ((mem_ctx = talloc_init("call_nt_transact_query_security_desc")) == NULL) { DEBUG(0,("call_nt_transact_query_security_desc: talloc_init failed.\n")); return ERROR_DOS(ERRDOS,ERRnomem); } diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 68792117ea..9bc02c3e17 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -467,6 +467,25 @@ BOOL reload_services(BOOL test) return(ret); } +/******************************************************************* + Print out all talloc memory info. +********************************************************************/ + +void return_all_talloc_info(int msg_type, pid_t src_pid, void *buf, size_t len) +{ + TALLOC_CTX *ctx = talloc_init("info context"); + char *info = NULL; + + if (!ctx) + return; + + info = talloc_describe_all(ctx); + if (info) + DEBUG(10,(info)); + message_send_pid(src_pid, MSG_TALLOC_USAGE, info, info ? strlen(info) + 1 : 0, True); + talloc_destroy(ctx); +} + #if DUMP_CORE /******************************************************************* prepare to dump a core file - carefully! @@ -763,19 +782,18 @@ static BOOL init_structs(void ) setpgid( (pid_t)0, (pid_t)0); #endif - if (!directory_exist(lp_lockdir(), NULL)) { + if (!directory_exist(lp_lockdir(), NULL)) mkdir(lp_lockdir(), 0755); - } - if (is_daemon) { + if (is_daemon) pidfile_create("smbd"); - } - if (!message_init()) { + if (!message_init()) exit(1); - } + register_msg_pool_usage(); register_dmalloc_msgs(); + message_register(MSG_REQ_TALLOC_USAGE, return_all_talloc_info); if (!print_backend_init()) exit(1); @@ -844,7 +862,6 @@ static BOOL init_structs(void ) /* register our message handlers */ message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis); - talloc_init_named("dummy!"); smbd_process(); diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index c68d2b04d2..c8250f15f8 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -304,7 +304,7 @@ static NTSTATUS do_cmd(struct vfs_state *vfs, struct cmd_set *cmd_entry, char *c if (mem_ctx == NULL) { /* Create mem_ctx */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("do_cmd"))) { DEBUG(0, ("talloc_init() failed\n")); goto done; } diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index f0ea82d87c..72dbe49c16 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -180,7 +180,7 @@ static int net_ads_workgroup(int argc, const char **argv) if (!(ads = ads_startup())) return -1; - if (!(ctx = talloc_init_named("net_ads_workgroup"))) { + if (!(ctx = talloc_init("net_ads_workgroup"))) { return -1; } @@ -748,7 +748,7 @@ static int net_ads_printer_publish(int argc, const char **argv) struct in_addr server_ip; NTSTATUS nt_status; extern char *opt_workgroup; - TALLOC_CTX *mem_ctx = talloc_init(); + TALLOC_CTX *mem_ctx = talloc_init("net_ads_printer_publish"); ADS_MODLIST mods = ads_init_mods(mem_ctx); char *prt_dn, *srv_dn, **srv_cn; void *res = NULL; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 092d625ae5..2b2a69eb99 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -62,7 +62,7 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli) goto error; } - if (!(mem_ctx=talloc_init())) + if (!(mem_ctx=talloc_init("net_get_remote_domain_sid"))) { DEBUG(0,("net_get_remote_domain_sid: talloc_init returned NULL!\n")); goto error; @@ -138,7 +138,7 @@ static int run_rpc_command(struct cli_state *cli_arg, const int pipe_idx, int co /* Create mem_ctx */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("run_rpc_command"))) { DEBUG(0, ("talloc_init() failed\n")); cli_shutdown(cli); return -1; @@ -374,7 +374,7 @@ rpc_info_internals(const DOM_SID *domain_sid, struct cli_state *cli, result = cli_samr_query_dom_info(cli, mem_ctx, &domain_pol, 2, &ctr); if (NT_STATUS_IS_OK(result)) { - TALLOC_CTX *ctx = talloc_init(); + TALLOC_CTX *ctx = talloc_init("rpc_info_internals"); d_printf("Domain Name: %s\n", unistr2_tdup(ctx, &ctr.info.inf2.uni_domain)); d_printf("Domain SID: %s\n", sid_str); d_printf("Sequence number: %u\n", ctr.info.inf2.seq_num); @@ -1721,7 +1721,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) return -1; } - if (!(mem_ctx = talloc_init_named("establishing trust relationship to domain %s", + if (!(mem_ctx = talloc_init("establishing trust relationship to domain %s", domain_name))) { DEBUG(0, ("talloc_init() failed\n")); cli_shutdown(cli); @@ -1743,7 +1743,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) * Call LsaOpenPolicy and LsaQueryInfo */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("rpc_trustdom_establish"))) { DEBUG(0, ("talloc_init() failed\n")); cli_shutdown(cli); return -1; @@ -1903,7 +1903,7 @@ static int rpc_trustdom_list(int argc, const char **argv) * Listing trusted domains (stored in secrets.tdb, if local) */ - mem_ctx = talloc_init_named("trust relationships listing"); + mem_ctx = talloc_init("trust relationships listing"); /* * set domain and pdc name to local samba server (default) diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 4b78b7d283..1b711f7b43 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -141,7 +141,7 @@ int net_rpc_join_newstyle(int argc, const char **argv) if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC))) return 1; - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("net_rpc_join_newstyle"))) { DEBUG(0, ("Could not initialise talloc context\n")); goto done; } diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 34d926ab61..1bd39e3ebb 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -128,7 +128,7 @@ static void dump_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret SAM_DELTA_CTR *deltas; uint32 num_deltas; - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("dump_database"))) { return; } @@ -452,7 +452,7 @@ fetch_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *delta) d_printf("Group members of %s: ", grp->gr_name); - if (!(t = talloc_init())) { + if (!(t = talloc_init("fetch_group_mem_info"))) { DEBUG(0, ("could not talloc_init\n")); return NT_STATUS_NO_MEMORY; } @@ -656,7 +656,7 @@ fetch_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret_creds, SAM_DELTA_CTR *deltas; uint32 num_deltas; - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("fetch_database"))) { return; } diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 043aa689cc..07b2aa7fec 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -777,7 +777,7 @@ You can string acls together with spaces, commas or newlines\n\ struct cli_state *cli; - ctx=talloc_init(); + ctx=talloc_init("main"); setlinebuf(stdout); diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 72ac2dd095..f4d197147f 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -43,6 +43,7 @@ static struct { {"dmalloc-log-changed", MSG_REQ_DMALLOC_LOG_CHANGED }, {"shutdown", MSG_SHUTDOWN }, {"drvupgrade", MSG_PRINTER_DRVUPGRADE}, + {"tallocdump", MSG_REQ_TALLOC_USAGE}, {NULL, -1} }; @@ -75,8 +76,10 @@ static void usage(BOOL doexit) static int pong_count; static BOOL got_level; +static BOOL got_pool; static BOOL pong_registered = False; static BOOL debuglevel_registered = False; +static BOOL poolusage_registered = False; static BOOL profilelevel_registered = False; @@ -108,6 +111,22 @@ void pong_function(int msg_type, pid_t src, void *buf, size_t len) printf("PONG from PID %u\n",(unsigned int)src); } +/**************************************************************************** + Prints out the current talloc list. +****************************************************************************/ +void tallocdump_function(int msg_type, pid_t src, void *buf, size_t len) +{ + char *info = (char *)buf; + + printf("Current talloc contexts for process %u\n", (unsigned int)src ); + if (len == 0) + printf("None returned\n"); + else + printf(info); + printf("\n"); + got_pool = True; +} + /**************************************************************************** Prints out the current Debug level returned by MSG_DEBUGLEVEL ****************************************************************************/ @@ -347,6 +366,25 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params) } break; + case MSG_REQ_TALLOC_USAGE: + if (!poolusage_registered) { + message_register(MSG_TALLOC_USAGE, tallocdump_function); + poolusage_registered = True; + } + got_pool = False; + retval = send_message(dest, MSG_REQ_TALLOC_USAGE, NULL, 0, True); + if (retval) { + timeout_start = time(NULL); + while (!got_pool) { + message_dispatch(); + if ((time(NULL) - timeout_start) > MAX_WAIT) { + fprintf(stderr,"tallocdump timeout\n"); + break; + } + } + } + break; + case MSG_REQ_DEBUGLEVEL: if (!debuglevel_registered) { message_register(MSG_DEBUGLEVEL, debuglevel_function); diff --git a/source3/wrepld/server.c b/source3/wrepld/server.c index 295eb15596..144a5b570c 100644 --- a/source3/wrepld/server.c +++ b/source3/wrepld/server.c @@ -707,7 +707,7 @@ static void process(void) } /* Initialise the memory context */ - mem_ctx=talloc_init_named("wins repl talloc ctx"); + mem_ctx=talloc_init("wins repl talloc ctx"); /* initialise the global partners table */ partner_count=init_wins_partner_table(); -- cgit From b95b82b798704d75403c4cf06ce6a10a6161b501 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 22 Dec 2002 16:02:36 +0000 Subject: talloc_init_named -> talloc_init. Jeremy. (This used to be commit 20a44d4cf11d91e7a09176bfe673ad0cb230dffe) --- source3/lib/talloctort.c | 2 +- source3/modules/vfs_netatalk.c | 10 +++++----- source3/modules/vfs_recycle.c | 4 ++-- source3/sam/account.c | 2 +- source3/sam/group.c | 2 +- source3/sam/gums_api.c | 2 +- source3/sam/gums_helper.c | 4 ++-- source3/sam/interface.c | 2 +- source3/sam/sam_ads.c | 8 ++++---- 9 files changed, 18 insertions(+), 18 deletions(-) (limited to 'source3') diff --git a/source3/lib/talloctort.c b/source3/lib/talloctort.c index 3a64803776..ad5de38581 100644 --- a/source3/lib/talloctort.c +++ b/source3/lib/talloctort.c @@ -29,7 +29,7 @@ int main(void) TALLOC_CTX *ctx[NCTX]; for (i = 0; i < NCTX; i++) { - ctx[i] = talloc_init_named("torture(%d)", i); + ctx[i] = talloc_init("torture(%d)", i); } for (i = 0; i < NCTX; i++) { diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c index 353be36e6f..c869922a4c 100644 --- a/source3/modules/vfs_netatalk.c +++ b/source3/modules/vfs_netatalk.c @@ -223,7 +223,7 @@ static int atalk_rmdir(struct connection_struct *conn, const char *path) strstr(path, APPLEDOUBLE) ? (add = False) : (add = True); - if (!(ctx = talloc_init_named("remove_directory"))) + if (!(ctx = talloc_init("remove_directory"))) goto exit_rmdir; if (!(dpath = talloc_asprintf(ctx, "%s/%s%s", @@ -252,7 +252,7 @@ static int atalk_rename(struct connection_struct *conn, const char *old, const c if (!conn || !old) return ret; - if (!(ctx = talloc_init_named("rename_file"))) + if (!(ctx = talloc_init("rename_file"))) return ret; if (atalk_build_paths(ctx, conn->origpath, old, &adbl_path, &orig_path, @@ -308,7 +308,7 @@ static int atalk_unlink(struct connection_struct *conn, const char *path) } } - if (!(ctx = talloc_init_named("unlink_file"))) + if (!(ctx = talloc_init("unlink_file"))) return ret; if (atalk_build_paths(ctx, conn->origpath, path, &adbl_path, &orig_path, @@ -340,7 +340,7 @@ static int atalk_chmod(struct connection_struct *conn, const char *path, mode_t if (!conn || !path) return ret; - if (!(ctx = talloc_init_named("chmod_file"))) + if (!(ctx = talloc_init("chmod_file"))) return ret; if (atalk_build_paths(ctx, conn->origpath, path, &adbl_path, &orig_path, @@ -372,7 +372,7 @@ static int atalk_chown(struct connection_struct *conn, const char *path, uid_t u if (!conn || !path) return ret; - if (!(ctx = talloc_init_named("chown_file"))) + if (!(ctx = talloc_init("chown_file"))) return ret; if (atalk_build_paths(ctx, conn->origpath, path, &adbl_path, &orig_path, diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 83fc41cfbd..dcd83b7acd 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -104,7 +104,7 @@ vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, } recycle_bin_private_handle = vfs_handle; - if (!(mem_ctx = talloc_init_named("recycle bin data"))) { + if (!(mem_ctx = talloc_init("recycle bin data"))) { DEBUG(0, ("Failed to allocate memory in VFS module recycle_bin\n")); return NULL; } @@ -171,7 +171,7 @@ static int recycle_connect(struct connection_struct *conn, const char *service, return -1; } - if (!(ctx = talloc_init_named("recycle bin connection"))) { + if (!(ctx = talloc_init("recycle bin connection"))) { DEBUG(0, ("Failed to allocate memory in VFS module recycle_bin\n")); return -1; } diff --git a/source3/sam/account.c b/source3/sam/account.c index 1b43db57d9..b8336146cd 100644 --- a/source3/sam/account.c +++ b/source3/sam/account.c @@ -103,7 +103,7 @@ NTSTATUS sam_init_account(SAM_ACCOUNT_HANDLE **account) TALLOC_CTX *mem_ctx; NTSTATUS nt_status; - mem_ctx = talloc_init_named("sam internal SAM_ACCOUNT_HANDLE allocation"); + mem_ctx = talloc_init("sam internal SAM_ACCOUNT_HANDLE allocation"); if (!mem_ctx) { DEBUG(0,("sam_init_account: error while doing talloc_init()\n")); diff --git a/source3/sam/group.c b/source3/sam/group.c index 7e4bcc1425..101e3dd7ce 100644 --- a/source3/sam/group.c +++ b/source3/sam/group.c @@ -83,7 +83,7 @@ NTSTATUS sam_init_group(SAM_GROUP_HANDLE **group) TALLOC_CTX *mem_ctx; NTSTATUS nt_status; - mem_ctx = talloc_init_named("sam internal SAM_GROUP_HANDLE allocation"); + mem_ctx = talloc_init("sam internal SAM_GROUP_HANDLE allocation"); if (!mem_ctx) { DEBUG(0,("sam_init_group: error while doing talloc_init()\n")); diff --git a/source3/sam/gums_api.c b/source3/sam/gums_api.c index 1d67467b2b..0061988eea 100644 --- a/source3/sam/gums_api.c +++ b/source3/sam/gums_api.c @@ -795,7 +795,7 @@ NTSTATUS gums_create_commit_set(GUMS_COMMIT_SET **com_set, TALLOC_CTX *ctx, DOM_ TALLOC_CTX *mem_ctx; GUMS_COMMIT_SET *set; - mem_ctx = talloc_init_named("commit_set"); + mem_ctx = talloc_init("commit_set"); if (mem_ctx == NULL) return NT_STATUS_NO_MEMORY; set = (GUMS_COMMIT_SET *)talloc(mem_ctx, sizeof(GUMS_COMMIT_SET)); diff --git a/source3/sam/gums_helper.c b/source3/sam/gums_helper.c index d581d6574e..8526a2f1cc 100644 --- a/source3/sam/gums_helper.c +++ b/source3/sam/gums_helper.c @@ -372,7 +372,7 @@ NTSTATUS gums_init_builtin_groups(void) g_obj.type = GUMS_OBJ_GROUP; g_obj.version = 1; g_obj.seq_num = 0; - g_obj.mem_ctx = talloc_init_named("gums_init_backend_acct"); + g_obj.mem_ctx = talloc_init("gums_init_backend_acct"); if (g_obj.mem_ctx == NULL) { DEBUG(0, ("gums_init_backend: Out of Memory!\n")); return NT_STATUS_NO_MEMORY; @@ -591,7 +591,7 @@ NTSTATUS gums_init_builtin_groups(void) g_priv.type = GUMS_OBJ_GROUP; g_priv.version = 1; g_priv.seq_num = 0; - g_priv.mem_ctx = talloc_init_named("gums_init_backend_priv"); + g_priv.mem_ctx = talloc_init("gums_init_backend_priv"); if (g_priv.mem_ctx == NULL) { DEBUG(0, ("gums_init_backend: Out of Memory!\n")); return NT_STATUS_NO_MEMORY; diff --git a/source3/sam/interface.c b/source3/sam/interface.c index d08df42122..51ae561999 100644 --- a/source3/sam/interface.c +++ b/source3/sam/interface.c @@ -384,7 +384,7 @@ NTSTATUS make_sam_context(SAM_CONTEXT **context) { TALLOC_CTX *mem_ctx; - mem_ctx = talloc_init_named("sam_context internal allocation context"); + mem_ctx = talloc_init("sam_context internal allocation context"); if (!mem_ctx) { DEBUG(0, ("make_sam_context: talloc init failed!\n")); diff --git a/source3/sam/sam_ads.c b/source3/sam/sam_ads.c index d2bfab53b9..13e0369004 100755 --- a/source3/sam/sam_ads.c +++ b/source3/sam/sam_ads.c @@ -584,8 +584,8 @@ static NTSTATUS sam_ads_get_sec_desc(const SAM_METHODS *sam_method, const NT_USE return ads_ntstatus(ads_status); } - if (!(mem_ctx = talloc_init_named("sec_desc parse in sam_ads"))) { - DEBUG(1, ("talloc_init_named() failed for sec_desc parse context in sam_ads")); + if (!(mem_ctx = talloc_init("sec_desc parse in sam_ads"))) { + DEBUG(1, ("talloc_init() failed for sec_desc parse context in sam_ads")); ads_msgfree(ads_struct, sec_desc_res); return NT_STATUS_NO_MEMORY; } @@ -1323,8 +1323,8 @@ NTSTATUS sam_init_ads(SAM_METHODS *sam_method, const char *module_params) return NT_STATUS_NO_MEMORY; } - if (!(sam_ads_state->mem_ctx = talloc_init_named("sam_ads_method"))) { - DEBUG(0, ("talloc_init_named() failed for sam_ads_state->mem_ctx\n")); + if (!(sam_ads_state->mem_ctx = talloc_init("sam_ads_method"))) { + DEBUG(0, ("talloc_init() failed for sam_ads_state->mem_ctx\n")); return NT_STATUS_NO_MEMORY; } -- cgit From 54af5d0f252739240b933b61dffda445d1ca1337 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 23 Dec 2002 20:22:20 +0000 Subject: the 'padding' field in the query domain info reply is not a padding field at all. It seems to be an optional 12 byte structure of some kind. mkaplan found a situation where the structure was not present at all (depending on ptr_0) (This used to be commit d7f18c60f73a3acb00ec9b1f9c605cc8c9d690a7) --- source3/rpc_parse/parse_samr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index d5ca78bda4..61b13d1350 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -745,8 +745,14 @@ static BOOL sam_io_unk_info2(char *desc, SAM_UNK_INFO_2 * u_2, if(!prs_uint32("num_local_grps", ps, depth, &u_2->num_local_grps)) return False; - if(!prs_uint8s(False, "padding", ps, depth, u_2->padding,sizeof(u_2->padding))) - return False; + if (u_2->ptr_0) { + /* this was originally marked as 'padding'. It isn't + padding, it is some sort of optional 12 byte + structure. When it is present it contains zeros + !? */ + if(!prs_uint8s(False, "unknown", ps, depth, u_2->padding,sizeof(u_2->padding))) + return False; + } if(!smb_io_unistr2("uni_domain", &u_2->uni_domain, u_2->hdr_domain.buffer, ps, depth)) return False; -- cgit From 0fdf60f0512f1a4443e315d764d59636c2075fe7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 23 Dec 2002 23:53:56 +0000 Subject: Finish adding strings to all talloc_init() calls. Jeremy. (This used to be commit 784d15761c3271bfd602866f8f9f880dac77671c) --- source3/auth/auth_winbind.c | 3 +-- source3/lib/talloc.c | 1 - source3/libsmb/netlogon_unigrp.c | 19 ++++++++++--------- source3/modules/mysql.c | 2 +- source3/python/py_lsa.c | 2 +- source3/python/py_samr.c | 6 +++--- source3/python/py_smb.c | 4 ++-- source3/python/py_spoolss_drivers.c | 6 +++--- source3/python/py_spoolss_ports.c | 2 +- source3/python/py_spoolss_printers.c | 6 +++--- source3/rpcclient/samsync.c | 2 +- source3/sam/gums_api.c | 2 +- source3/torture/samtest.c | 2 +- source3/utils/rpccheck.c | 2 +- 14 files changed, 29 insertions(+), 30 deletions(-) (limited to 'source3') diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c index c6a1727ebe..e45e2c879f 100644 --- a/source3/auth/auth_winbind.c +++ b/source3/auth/auth_winbind.c @@ -127,9 +127,8 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, /* module initialisation */ NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char *param, auth_methods **auth_method) { - if (!make_auth_methods(auth_context, auth_method)) { + if (!make_auth_methods(auth_context, auth_method)) return NT_STATUS_NO_MEMORY; - } (*auth_method)->name = "winbind"; (*auth_method)->auth = check_winbind_security; diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index f0c13753b5..b6c8b2efdf 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -136,7 +136,6 @@ static TALLOC_CTX *talloc_init_internal(void) /** * Create a new talloc context, with a name specifying its purpose. - * Please call this in preference to talloc_init(). **/ TALLOC_CTX *talloc_init(char const *fmt, ...) diff --git a/source3/libsmb/netlogon_unigrp.c b/source3/libsmb/netlogon_unigrp.c index ea9e790b7d..fa2fe32f35 100644 --- a/source3/libsmb/netlogon_unigrp.c +++ b/source3/libsmb/netlogon_unigrp.c @@ -47,7 +47,7 @@ BOOL uni_group_cache_init(void) return (netlogon_unigrp_tdb != NULL); } -void uni_group_cache_store_netlogon(TALLOC_CTX *mem_ctx, NET_USER_INFO_3 *user) +BOOL uni_group_cache_store_netlogon(TALLOC_CTX *mem_ctx, NET_USER_INFO_3 *user) { TDB_DATA key,data; fstring keystr; @@ -55,7 +55,7 @@ void uni_group_cache_store_netlogon(TALLOC_CTX *mem_ctx, NET_USER_INFO_3 *user) if (!uni_group_cache_init()) { DEBUG(0,("uni_group_cache_store_netlogon: cannot open netlogon_unigrp.tdb for write!\n")); - return; + return False; } /* Prepare key as DOMAIN-SID/USER-RID string */ @@ -70,7 +70,7 @@ void uni_group_cache_store_netlogon(TALLOC_CTX *mem_ctx, NET_USER_INFO_3 *user) if(!data.dptr) { DEBUG(0,("uni_group_cache_store_netlogon: cannot allocate memory!\n")); talloc_destroy(mem_ctx); - return; + return False; } /* Store data in byteorder-independent format */ @@ -78,7 +78,9 @@ void uni_group_cache_store_netlogon(TALLOC_CTX *mem_ctx, NET_USER_INFO_3 *user) for(i=1; i<=user->num_groups2; i++) { SIVAL(&((uint32*)data.dptr)[i],0,user->gids[i-1].g_rid); } - tdb_store(netlogon_unigrp_tdb, key, data, TDB_REPLACE); + if (tdb_store(netlogon_unigrp_tdb, key, data, TDB_REPLACE) == -1) + return False; + return True; } /* @@ -149,10 +151,9 @@ uint32* uni_group_cache_fetch(DOM_SID *domain, uint32 user_rid, } /* Shutdown netlogon_unigrp database */ -void uni_group_cache_shutdown(void) +BOOL uni_group_cache_shutdown(void) { - if(netlogon_unigrp_tdb) { - tdb_close(netlogon_unigrp_tdb); - } + if(netlogon_unigrp_tdb) + return (tdb_close(netlogon_unigrp_tdb) == 0); + return True; } - diff --git a/source3/modules/mysql.c b/source3/modules/mysql.c index 5516befc08..1d5819295b 100644 --- a/source3/modules/mysql.c +++ b/source3/modules/mysql.c @@ -676,7 +676,7 @@ static NTSTATUS mysqlsam_replace_sam_account(struct pdb_methods *methods, /* I know this is somewhat overkill but only the talloc * functions have asprint_append and the 'normal' asprintf * is a GNU extension */ - query.mem_ctx = talloc_init(); + query.mem_ctx = talloc_init("mysqlsam_replace_sam_account"); query.part2 = talloc_asprintf(query.mem_ctx, "%s", ""); if (query.update) { query.part1 = diff --git a/source3/python/py_lsa.c b/source3/python/py_lsa.c index d54a2289ef..31706af684 100644 --- a/source3/python/py_lsa.c +++ b/source3/python/py_lsa.c @@ -84,7 +84,7 @@ static PyObject *lsa_open_policy(PyObject *self, PyObject *args, return NULL; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("lsa_open_policy"))) { PyErr_SetString(lsa_error, "unable to init talloc context\n"); goto done; } diff --git a/source3/python/py_samr.c b/source3/python/py_samr.c index 92a2eaf063..208274d9b5 100644 --- a/source3/python/py_samr.c +++ b/source3/python/py_samr.c @@ -73,7 +73,7 @@ static PyObject *samr_open_domain(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("samr_open_domain"))) { PyErr_SetString(samr_error, "unable to init talloc context"); return NULL; } @@ -167,7 +167,7 @@ static PyObject *samr_enum_dom_groups(PyObject *self, PyObject *args, args, kw, "", kwlist)) return NULL; - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("samr_enum_dom_groups"))) { PyErr_SetString(samr_error, "unable to init talloc context"); return NULL; } @@ -399,7 +399,7 @@ static PyObject *samr_connect(PyObject *self, PyObject *args, PyObject *kw) return NULL; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("samr_connect"))) { PyErr_SetString(samr_ntstatus, "unable to init talloc context\n"); goto done; diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c index efb7d0a5fd..8d81176e4d 100644 --- a/source3/python/py_smb.c +++ b/source3/python/py_smb.c @@ -232,7 +232,7 @@ static PyObject *py_smb_query_secdesc(PyObject *self, PyObject *args, args, kw, "i", kwlist, &fnum)) return NULL; - mem_ctx = talloc_init(); + mem_ctx = talloc_init("py_smb_query_secdesc"); secdesc = cli_query_secdesc(cli->cli, fnum, mem_ctx); @@ -269,7 +269,7 @@ static PyObject *py_smb_set_secdesc(PyObject *self, PyObject *args, static char *kwlist[] = { "fnum", "security_descriptor", NULL }; PyObject *py_secdesc; SEC_DESC *secdesc; - TALLOC_CTX *mem_ctx = talloc_init(); + TALLOC_CTX *mem_ctx = talloc_init("py_smb_set_secdesc"); int fnum; BOOL result; diff --git a/source3/python/py_spoolss_drivers.c b/source3/python/py_spoolss_drivers.c index 6daa32d0f4..a072ac0d5c 100644 --- a/source3/python/py_spoolss_drivers.c +++ b/source3/python/py_spoolss_drivers.c @@ -63,7 +63,7 @@ PyObject *spoolss_enumprinterdrivers(PyObject *self, PyObject *args, goto done; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_enumprinterdrivers"))) { PyErr_SetString( spoolss_error, "unable to init talloc context\n"); goto done; @@ -267,7 +267,7 @@ PyObject *spoolss_getprinterdriverdir(PyObject *self, PyObject *args, goto done; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_getprinterdriverdir"))) { PyErr_SetString( spoolss_error, "unable to init talloc context\n"); goto done; @@ -335,7 +335,7 @@ PyObject *spoolss_addprinterdriver(PyObject *self, PyObject *args, return NULL; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_addprinterdriver"))) { PyErr_SetString( spoolss_error, "unable to init talloc context\n"); return NULL; diff --git a/source3/python/py_spoolss_ports.c b/source3/python/py_spoolss_ports.c index 55716aca6e..ddc8868f0f 100644 --- a/source3/python/py_spoolss_ports.c +++ b/source3/python/py_spoolss_ports.c @@ -59,7 +59,7 @@ PyObject *spoolss_enumports(PyObject *self, PyObject *args, PyObject *kw) goto done; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_enumports"))) { PyErr_SetString( spoolss_error, "unable to init talloc context\n"); goto done; diff --git a/source3/python/py_spoolss_printers.c b/source3/python/py_spoolss_printers.c index a96498dddc..2076bd76cf 100644 --- a/source3/python/py_spoolss_printers.c +++ b/source3/python/py_spoolss_printers.c @@ -62,7 +62,7 @@ PyObject *spoolss_openprinter(PyObject *self, PyObject *args, PyObject *kw) goto done; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_openprinter"))) { PyErr_SetString(spoolss_error, "unable to init talloc context\n"); goto done; @@ -310,7 +310,7 @@ PyObject *spoolss_enumprinters(PyObject *self, PyObject *args, PyObject *kw) goto done; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_enumprinters"))) { PyErr_SetString( spoolss_error, "unable to init talloc context\n"); goto done; @@ -445,7 +445,7 @@ PyObject *spoolss_addprinterex(PyObject *self, PyObject *args, PyObject *kw) goto done; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("spoolss_addprinterex"))) { PyErr_SetString( spoolss_error, "unable to init talloc context\n"); goto done; diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index cbc3601812..f941d70e5e 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -373,7 +373,7 @@ static NTSTATUS sam_sync(struct cli_state *cli, unsigned char trust_passwd[16], return result; } - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("sam_sync"))) { DEBUG(0,("talloc_init failed\n")); return result; } diff --git a/source3/sam/gums_api.c b/source3/sam/gums_api.c index 0061988eea..df5faa42c1 100644 --- a/source3/sam/gums_api.c +++ b/source3/sam/gums_api.c @@ -35,7 +35,7 @@ NTSTATUS gums_get_object_type(uint32 *type, const GUMS_OBJECT *obj) NTSTATUS gums_create_object(GUMS_OBJECT **obj, uint32 type) { - TALLOC_CTX *mem_ctx = talloc_init(); + TALLOC_CTX *mem_ctx = talloc_init("gums_create_object"); GUMS_OBJECT *go; NT_STATUS ret; diff --git a/source3/torture/samtest.c b/source3/torture/samtest.c index d3268d8b5b..17444c0757 100644 --- a/source3/torture/samtest.c +++ b/source3/torture/samtest.c @@ -249,7 +249,7 @@ static NTSTATUS do_cmd(struct samtest_state *st, struct cmd_set *cmd_entry, char if (mem_ctx == NULL) { /* Create mem_ctx */ - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init("do_cmd"))) { DEBUG(0, ("talloc_init() failed\n")); goto done; } diff --git a/source3/utils/rpccheck.c b/source3/utils/rpccheck.c index ab7286f8be..ae109f69b6 100644 --- a/source3/utils/rpccheck.c +++ b/source3/utils/rpccheck.c @@ -38,7 +38,7 @@ main() setup_logging("", True); DEBUGLEVEL=10; - ctx=talloc_init(); + ctx=talloc_init("main"); if (!ctx) exit(1); prs_init(&ps, 1600, 4, ctx, MARSHALL); -- cgit From b3c3701c0762e535a788b2328cfc212594c978c8 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Fri, 27 Dec 2002 22:55:11 +0000 Subject: For some reason, the configure tests for sendfile support in FreeBSD were broken. This works for 4.3 and 4.6.2. (This used to be commit 91e2d21bd1401ca874c59f4d93f8b429c38b642d) --- source3/configure | 1468 +++++++++++++++++++++++++------------------------- source3/configure.in | 13 +- 2 files changed, 740 insertions(+), 741 deletions(-) (limited to 'source3') diff --git a/source3/configure b/source3/configure index d5d178659f..38cf8812c6 100755 --- a/source3/configure +++ b/source3/configure @@ -1293,7 +1293,7 @@ else if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.$ac_ext | *.c | *.o | *.obj) ;; + *.c | *.C | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -3069,7 +3069,6 @@ else #line 3070 "configure" #include "confdefs.h" #include -#include main() { FILE *f=fopen("conftestval", "w"); @@ -3078,7 +3077,7 @@ main() exit(0); } EOF -if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -3098,7 +3097,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3102: checking size of long" >&5 +echo "configure:3101: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3106,10 +3105,9 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -#include main() { FILE *f=fopen("conftestval", "w"); @@ -3118,7 +3116,7 @@ main() exit(0); } EOF -if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -3138,7 +3136,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3142: checking size of short" >&5 +echo "configure:3140: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3146,10 +3144,9 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -#include main() { FILE *f=fopen("conftestval", "w"); @@ -3158,7 +3155,7 @@ main() exit(0); } EOF -if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -3179,12 +3176,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3183: checking for working const" >&5 +echo "configure:3180: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3254,21 +3251,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3258: checking for inline" >&5 +echo "configure:3255: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3294,14 +3291,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3298: checking whether byte ordering is bigendian" >&5 +echo "configure:3295: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3312,11 +3309,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3327,7 +3324,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3347,7 +3344,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3384,14 +3381,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3388: checking whether char is unsigned" >&5 +echo "configure:3385: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3448,12 +3445,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3452: checking return type of signal handlers" >&5 +echo "configure:3449: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3470,7 +3467,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3489,12 +3486,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3493: checking for uid_t in sys/types.h" >&5 +echo "configure:3490: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3523,12 +3520,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3527: checking for mode_t" >&5 +echo "configure:3524: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3556,12 +3553,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3560: checking for off_t" >&5 +echo "configure:3557: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3589,12 +3586,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3593: checking for size_t" >&5 +echo "configure:3590: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3622,12 +3619,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3626: checking for pid_t" >&5 +echo "configure:3623: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3655,12 +3652,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3659: checking for st_rdev in struct stat" >&5 +echo "configure:3656: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3668,7 +3665,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3689,12 +3686,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3693: checking for d_off in dirent" >&5 +echo "configure:3690: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3704,7 +3701,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3725,12 +3722,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3729: checking for ino_t" >&5 +echo "configure:3726: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3758,12 +3755,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3762: checking for loff_t" >&5 +echo "configure:3759: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3791,12 +3788,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3795: checking for offset_t" >&5 +echo "configure:3792: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3824,12 +3821,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3828: checking for ssize_t" >&5 +echo "configure:3825: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3857,12 +3854,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3861: checking for wchar_t" >&5 +echo "configure:3858: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3904,7 +3901,7 @@ if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3908: checking for $ac_word" >&5 +echo "configure:3905: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3953,12 +3950,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3957: checking for $ac_func" >&5 +echo "configure:3954: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4007,7 +4004,7 @@ done if test x"$ac_cv_func_dlopen" = x"no"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4011: checking for dlopen in -ldl" >&5 +echo "configure:4008: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4015,7 +4012,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4056,13 +4053,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:4060: checking for immediate structures" >&5 +echo "configure:4057: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4080,7 +4077,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -4103,13 +4100,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:4107: checking for unix domain sockets" >&5 +echo "configure:4104: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4124,7 +4121,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -4146,13 +4143,13 @@ fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:4150: checking for socklen_t type" >&5 +echo "configure:4147: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4165,7 +4162,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -4186,13 +4183,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:4190: checking for sig_atomic_t type" >&5 +echo "configure:4187: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4205,7 +4202,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:4209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -4228,20 +4225,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4232: checking for errno declaration" >&5 +echo "configure:4229: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -4263,20 +4260,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4267: checking for setresuid declaration" >&5 +echo "configure:4264: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -4298,20 +4295,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4302: checking for setresgid declaration" >&5 +echo "configure:4299: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:4315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -4333,20 +4330,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4337: checking for asprintf declaration" >&5 +echo "configure:4334: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4368,20 +4365,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4372: checking for vasprintf declaration" >&5 +echo "configure:4369: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4403,20 +4400,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4407: checking for vsnprintf declaration" >&5 +echo "configure:4404: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4438,20 +4435,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4442: checking for snprintf declaration" >&5 +echo "configure:4439: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4475,7 +4472,7 @@ EOF # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4479: checking for real setresuid" >&5 +echo "configure:4476: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4484,12 +4481,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -4514,7 +4511,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4518: checking for real setresgid" >&5 +echo "configure:4515: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4523,13 +4520,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresgid=yes else @@ -4552,7 +4549,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4556: checking for 8-bit clean memcmp" >&5 +echo "configure:4553: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4560,7 +4557,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4593,12 +4590,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4597: checking for $ac_func" >&5 +echo "configure:4594: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4647,7 +4644,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4651: checking for crypt in -lcrypt" >&5 +echo "configure:4648: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4655,7 +4652,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4699,7 +4696,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4703: checking whether to use readline" >&5 +echo "configure:4700: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4711,17 +4708,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4715: checking for $ac_hdr" >&5 +echo "configure:4712: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4751,17 +4748,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4755: checking for $ac_hdr" >&5 +echo "configure:4752: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4792,17 +4789,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4796: checking for $ac_hdr" >&5 +echo "configure:4793: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4825,7 +4822,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4829: checking for tgetent in -l${termlib}" >&5 +echo "configure:4826: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4833,7 +4830,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4866,7 +4863,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4870: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4867: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4874,7 +4871,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4936,17 +4933,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4940: checking for $ac_hdr" >&5 +echo "configure:4937: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4976,17 +4973,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4980: checking for $ac_hdr" >&5 +echo "configure:4977: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5017,17 +5014,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5021: checking for $ac_hdr" >&5 +echo "configure:5018: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5050,7 +5047,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:5054: checking for tgetent in -l${termlib}" >&5 +echo "configure:5051: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5058,7 +5055,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5091,7 +5088,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:5095: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:5092: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5099,7 +5096,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5160,7 +5157,7 @@ fi # code will generate warnings on one of them unless we have a few # special cases. echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:5164: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:5161: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5168,7 +5165,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5212,12 +5209,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5216: checking for $ac_func" >&5 +echo "configure:5213: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5268,7 +5265,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5272: checking for printf in -lnsl_s" >&5 +echo "configure:5269: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5276,7 +5273,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5318,7 +5315,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5322: checking for printf in -lnsl" >&5 +echo "configure:5319: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5326,7 +5323,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5368,7 +5365,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5372: checking for connect in -lsocket" >&5 +echo "configure:5369: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5376,7 +5373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5418,7 +5415,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5422: checking for connect in -linet" >&5 +echo "configure:5419: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5426,7 +5423,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5481,12 +5478,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5485: checking for $ac_func" >&5 +echo "configure:5482: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5535,7 +5532,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5539: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5536: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5543,7 +5540,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5584,12 +5581,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5588: checking for $ac_func" >&5 +echo "configure:5585: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5643,12 +5640,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5647: checking for $ac_func" >&5 +echo "configure:5644: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5698,12 +5695,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5702: checking for $ac_func" >&5 +echo "configure:5699: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5753,12 +5750,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5757: checking for $ac_func" >&5 +echo "configure:5754: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5808,12 +5805,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5812: checking for $ac_func" >&5 +echo "configure:5809: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5863,12 +5860,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5867: checking for $ac_func" >&5 +echo "configure:5864: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5918,12 +5915,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5922: checking for $ac_func" >&5 +echo "configure:5919: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5973,12 +5970,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5977: checking for $ac_func" >&5 +echo "configure:5974: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6028,12 +6025,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6032: checking for $ac_func" >&5 +echo "configure:6029: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6083,12 +6080,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6087: checking for $ac_func" >&5 +echo "configure:6084: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6138,12 +6135,12 @@ done for ac_func in syslog vsyslog getgrouplist timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6142: checking for $ac_func" >&5 +echo "configure:6139: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6194,12 +6191,12 @@ done for ac_func in setbuffer shmget shm_open do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6198: checking for $ac_func" >&5 +echo "configure:6195: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6251,12 +6248,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6255: checking for $ac_func" >&5 +echo "configure:6252: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6307,12 +6304,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6311: checking for $ac_func" >&5 +echo "configure:6308: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6362,12 +6359,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6366: checking for $ac_func" >&5 +echo "configure:6363: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6417,12 +6414,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6421: checking for $ac_func" >&5 +echo "configure:6418: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6472,12 +6469,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6476: checking for $ac_func" >&5 +echo "configure:6473: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6527,12 +6524,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6531: checking for $ac_func" >&5 +echo "configure:6528: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6582,12 +6579,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6586: checking for $ac_func" >&5 +echo "configure:6583: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6637,12 +6634,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6641: checking for $ac_func" >&5 +echo "configure:6638: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6692,12 +6689,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6696: checking for $ac_func" >&5 +echo "configure:6693: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6747,12 +6744,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6751: checking for $ac_func" >&5 +echo "configure:6748: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6802,12 +6799,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6806: checking for $ac_func" >&5 +echo "configure:6803: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6857,12 +6854,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6861: checking for $ac_func" >&5 +echo "configure:6858: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6912,12 +6909,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6916: checking for $ac_func" >&5 +echo "configure:6913: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6967,12 +6964,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6971: checking for $ac_func" >&5 +echo "configure:6968: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7022,12 +7019,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7026: checking for $ac_func" >&5 +echo "configure:7023: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7081,9 +7078,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:7085: checking for stat64 in " >&5 +echo "configure:7082: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -7114,9 +7111,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:7118: checking for lstat64 in " >&5 +echo "configure:7115: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -7147,9 +7144,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:7151: checking for fstat64 in " >&5 +echo "configure:7148: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -7181,7 +7178,7 @@ fi ##################################### # we might need the resolv library on some systems echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:7185: checking for dn_expand in -lresolv" >&5 +echo "configure:7182: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7189,7 +7186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7238,12 +7235,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7242: checking for $ac_func" >&5 +echo "configure:7239: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7291,7 +7288,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7295: checking for putprpwnam in -lsecurity" >&5 +echo "configure:7292: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7299,7 +7296,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7340,12 +7337,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7344: checking for $ac_func" >&5 +echo "configure:7341: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7399,12 +7396,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7403: checking for $ac_func" >&5 +echo "configure:7400: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7452,7 +7449,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7456: checking for putprpwnam in -lsec" >&5 +echo "configure:7453: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7460,7 +7457,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7501,12 +7498,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7505: checking for $ac_func" >&5 +echo "configure:7502: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7561,12 +7558,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7565: checking for $ac_func" >&5 +echo "configure:7562: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7614,7 +7611,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7618: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7615: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7622,7 +7619,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7663,12 +7660,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7667: checking for $ac_func" >&5 +echo "configure:7664: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7722,12 +7719,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7726: checking for $ac_func" >&5 +echo "configure:7723: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7775,7 +7772,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7779: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7776: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7783,7 +7780,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7824,12 +7821,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7828: checking for $ac_func" >&5 +echo "configure:7825: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7885,12 +7882,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7889: checking for $ac_func" >&5 +echo "configure:7886: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7938,7 +7935,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7942: checking for getspnam in -lgen" >&5 +echo "configure:7939: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7946,7 +7943,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7987,12 +7984,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7991: checking for $ac_func" >&5 +echo "configure:7988: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8047,12 +8044,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8051: checking for $ac_func" >&5 +echo "configure:8048: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8100,7 +8097,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8104: checking for getspnam in -lsecurity" >&5 +echo "configure:8101: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8108,7 +8105,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8149,12 +8146,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8153: checking for $ac_func" >&5 +echo "configure:8150: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8208,12 +8205,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8212: checking for $ac_func" >&5 +echo "configure:8209: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8261,7 +8258,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8265: checking for getspnam in -lsec" >&5 +echo "configure:8262: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8269,7 +8266,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8310,12 +8307,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8314: checking for $ac_func" >&5 +echo "configure:8311: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8370,12 +8367,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8374: checking for $ac_func" >&5 +echo "configure:8371: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8423,7 +8420,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8427: checking for bigcrypt in -lsecurity" >&5 +echo "configure:8424: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8431,7 +8428,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8472,12 +8469,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8476: checking for $ac_func" >&5 +echo "configure:8473: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8531,12 +8528,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8535: checking for $ac_func" >&5 +echo "configure:8532: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8584,7 +8581,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8588: checking for bigcrypt in -lsec" >&5 +echo "configure:8585: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8592,7 +8589,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8633,12 +8630,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8637: checking for $ac_func" >&5 +echo "configure:8634: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8693,12 +8690,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8697: checking for $ac_func" >&5 +echo "configure:8694: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8746,7 +8743,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8750: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8747: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8754,7 +8751,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8795,12 +8792,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8799: checking for $ac_func" >&5 +echo "configure:8796: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8854,12 +8851,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8858: checking for $ac_func" >&5 +echo "configure:8855: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8907,7 +8904,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8911: checking for getprpwnam in -lsec" >&5 +echo "configure:8908: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8915,7 +8912,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8956,12 +8953,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8960: checking for $ac_func" >&5 +echo "configure:8957: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9028,7 +9025,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:9032: checking ability to build shared libraries" >&5 +echo "configure:9029: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -9223,7 +9220,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9227: checking for $ac_word" >&5 +echo "configure:9224: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9305,17 +9302,17 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9309: checking linker flags for shared libraries" >&5 +echo "configure:9306: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9312: checking compiler flags for position-independent code" >&5 +echo "configure:9309: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9319: checking whether building shared libraries actually works" >&5 +echo "configure:9316: checking whether building shared libraries actually works" >&5 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9353,7 +9350,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9357: checking for long long" >&5 +echo "configure:9354: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9362,12 +9359,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -9394,20 +9391,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9398: checking for LL suffix on long long integers" >&5 +echo "configure:9395: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:9411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -9429,7 +9426,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9433: checking for 64 bit off_t" >&5 +echo "configure:9430: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9438,13 +9435,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -9467,7 +9464,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9471: checking for off64_t" >&5 +echo "configure:9468: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9476,7 +9473,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -9509,7 +9506,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9513: checking for 64 bit ino_t" >&5 +echo "configure:9510: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9518,13 +9515,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -9547,7 +9544,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9551: checking for ino64_t" >&5 +echo "configure:9548: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9556,7 +9553,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -9589,7 +9586,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9593: checking for dev64_t" >&5 +echo "configure:9590: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9598,7 +9595,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9631,13 +9628,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9635: checking for struct dirent64" >&5 +echo "configure:9632: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9670,7 +9667,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9674: checking for major macro" >&5 +echo "configure:9671: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9679,7 +9676,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9711,7 +9708,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9715: checking for minor macro" >&5 +echo "configure:9712: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9720,7 +9717,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9752,7 +9749,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9756: checking for unsigned char" >&5 +echo "configure:9753: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9761,12 +9758,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -9789,13 +9786,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9793: checking for sin_len in sock" >&5 +echo "configure:9790: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9804,7 +9801,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9825,13 +9822,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9829: checking whether seekdir returns void" >&5 +echo "configure:9826: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9840,7 +9837,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9861,20 +9858,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9865: checking for __FUNCTION__ macro" >&5 +echo "configure:9862: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9895,7 +9892,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9899: checking if gettimeofday takes tz argument" >&5 +echo "configure:9896: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9904,14 +9901,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -9934,13 +9931,13 @@ EOF fi echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9938: checking for __va_copy" >&5 +echo "configure:9935: checking for __va_copy" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < va_list ap1,ap2; @@ -9948,7 +9945,7 @@ int main() { __va_copy(ap1,ap2); ; return 0; } EOF -if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_VA_COPY=yes else @@ -9969,7 +9966,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9973: checking for C99 vsnprintf" >&5 +echo "configure:9970: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9978,7 +9975,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -10005,7 +10002,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:10009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -10028,7 +10025,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:10032: checking for broken readdir" >&5 +echo "configure:10029: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10037,7 +10034,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -10045,7 +10042,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:10049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -10068,13 +10065,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:10072: checking for utimbuf" >&5 +echo "configure:10069: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10082,7 +10079,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:10086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -10106,12 +10103,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10110: checking for $ac_func" >&5 +echo "configure:10107: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10160,13 +10157,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:10164: checking for ut_name in utmp" >&5 +echo "configure:10161: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10174,7 +10171,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -10195,13 +10192,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:10199: checking for ut_user in utmp" >&5 +echo "configure:10196: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10209,7 +10206,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -10230,13 +10227,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:10234: checking for ut_id in utmp" >&5 +echo "configure:10231: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10244,7 +10241,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -10265,13 +10262,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10269: checking for ut_host in utmp" >&5 +echo "configure:10266: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10279,7 +10276,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -10300,13 +10297,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10304: checking for ut_time in utmp" >&5 +echo "configure:10301: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10314,7 +10311,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:10318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -10335,13 +10332,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10339: checking for ut_tv in utmp" >&5 +echo "configure:10336: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10349,7 +10346,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:10353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -10370,13 +10367,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10374: checking for ut_type in utmp" >&5 +echo "configure:10371: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10384,7 +10381,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:10388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -10405,13 +10402,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10409: checking for ut_pid in utmp" >&5 +echo "configure:10406: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10419,7 +10416,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:10423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -10440,13 +10437,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10444: checking for ut_exit in utmp" >&5 +echo "configure:10441: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10454,7 +10451,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:10458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -10475,13 +10472,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10479: checking for ut_addr in utmp" >&5 +echo "configure:10476: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10489,7 +10486,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:10493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -10511,13 +10508,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10515: checking whether pututline returns pointer" >&5 +echo "configure:10512: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10525,7 +10522,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:10529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -10547,13 +10544,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10551: checking for ut_syslen in utmpx" >&5 +echo "configure:10548: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10561,7 +10558,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10585,7 +10582,7 @@ fi ################################################# # check for libiconv support echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10589: checking whether to use libiconv" >&5 +echo "configure:10586: checking whether to use libiconv" >&5 # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" @@ -10598,7 +10595,7 @@ if test "${with_libiconv+set}" = set; then CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10602: checking for iconv_open in -liconv" >&5 +echo "configure:10599: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10606,7 +10603,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10660,7 +10657,7 @@ fi ############ # check for iconv in libc echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10664: checking for working iconv" >&5 +echo "configure:10661: checking for working iconv" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10669,7 +10666,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else cat > conftest.$ac_ext < @@ -10680,7 +10677,7 @@ main() { } EOF -if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NATIVE_ICONV=yes else @@ -10704,7 +10701,7 @@ fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10708: checking for Linux kernel oplocks" >&5 +echo "configure:10705: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10713,7 +10710,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10727,7 +10724,7 @@ main() { } EOF -if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10750,7 +10747,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10754: checking for kernel change notify support" >&5 +echo "configure:10751: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10759,7 +10756,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10773,7 +10770,7 @@ main() { } EOF -if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10796,7 +10793,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10800: checking for kernel share modes" >&5 +echo "configure:10797: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10805,7 +10802,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10821,7 +10818,7 @@ main() { } EOF -if { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10847,13 +10844,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10851: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10848: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10861,7 +10858,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:10865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10882,7 +10879,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10886: checking for irix specific capabilities" >&5 +echo "configure:10883: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10891,7 +10888,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10906,7 +10903,7 @@ main() { } EOF -if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10934,13 +10931,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10938: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10935: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10950,7 +10947,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10971,13 +10968,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10975: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10972: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10987,7 +10984,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -11008,13 +11005,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:11012: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:11009: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -11024,7 +11021,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:11028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -11045,13 +11042,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:11049: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:11046: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -11061,7 +11058,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:11065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -11083,13 +11080,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:11087: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:11084: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -11103,7 +11100,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:11107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -11124,16 +11121,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:11128: checking for test routines" >&5 +echo "configure:11125: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -11147,7 +11144,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:11151: checking for ftruncate extend" >&5 +echo "configure:11148: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11156,11 +11153,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -11183,7 +11180,7 @@ EOF fi echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:11187: checking for AF_LOCAL socket support" >&5 +echo "configure:11184: checking for AF_LOCAL socket support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11192,11 +11189,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_WORKING_AF_LOCAL=yes else @@ -11220,7 +11217,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:11224: checking for broken getgroups" >&5 +echo "configure:11221: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11229,11 +11226,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -11256,7 +11253,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11260: checking whether getpass should be replaced" >&5 +echo "configure:11257: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11264,7 +11261,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -11300,7 +11297,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11304: checking for broken inet_ntoa" >&5 +echo "configure:11301: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11309,7 +11306,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -11323,7 +11320,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:11327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -11346,7 +11343,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11350: checking for secure mkstemp" >&5 +echo "configure:11347: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11355,7 +11352,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -11372,7 +11369,7 @@ main() { exit(0); } EOF -if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -11395,7 +11392,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11399: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:11396: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11404,12 +11401,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -11432,7 +11429,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11436: checking for root" >&5 +echo "configure:11433: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11441,11 +11438,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -11473,7 +11470,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11477: checking for iface AIX" >&5 +echo "configure:11474: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11482,7 +11479,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -11514,7 +11511,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11518: checking for iface ifconf" >&5 +echo "configure:11515: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11523,7 +11520,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -11556,7 +11553,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11560: checking for iface ifreq" >&5 +echo "configure:11557: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11565,7 +11562,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -11602,7 +11599,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11606: checking for setresuid" >&5 +echo "configure:11603: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11611,7 +11608,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -11645,7 +11642,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11649: checking for setreuid" >&5 +echo "configure:11646: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11654,7 +11651,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -11687,7 +11684,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11691: checking for seteuid" >&5 +echo "configure:11688: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11696,7 +11693,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -11729,7 +11726,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11733: checking for setuidx" >&5 +echo "configure:11730: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11738,7 +11735,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -11771,7 +11768,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11775: checking for working mmap" >&5 +echo "configure:11772: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11780,11 +11777,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11807,7 +11804,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11811: checking for ftruncate needs root" >&5 +echo "configure:11808: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11816,11 +11813,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11843,7 +11840,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11847: checking for fcntl locking" >&5 +echo "configure:11844: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11852,11 +11849,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -11879,7 +11876,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11883: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11880: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11888,11 +11885,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11917,7 +11914,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11921: checking for 64 bit fcntl locking" >&5 +echo "configure:11918: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11926,7 +11923,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -11975,13 +11972,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11979: checking for st_blocks in struct stat" >&5 +echo "configure:11976: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11990,7 +11987,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -12011,13 +12008,13 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:12015: checking for st_blksize in struct stat" >&5 +echo "configure:12012: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12026,7 +12023,7 @@ int main() { struct stat st; st.st_blksize = 0; ; return 0; } EOF -if { (eval echo configure:12030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLKSIZE=yes else @@ -12049,13 +12046,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:12053: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:12050: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -12092,13 +12089,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:12096: checking for broken nisplus include files" >&5 +echo "configure:12093: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -12108,7 +12105,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:12112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -12132,7 +12129,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:12136: checking whether to use smbwrapper" >&5 +echo "configure:12133: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -12181,7 +12178,7 @@ fi ################################################# # check for AFS clear-text auth support echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:12185: checking whether to use AFS clear-text auth" >&5 +echo "configure:12182: checking whether to use AFS clear-text auth" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -12207,7 +12204,7 @@ fi ################################################# # check for the DFS clear-text auth system echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:12211: checking whether to use DFS clear-text auth" >&5 +echo "configure:12208: checking whether to use DFS clear-text auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -12234,7 +12231,7 @@ fi with_ads_support=yes echo $ac_n "checking whether to use Active Directory""... $ac_c" 1>&6 -echo "configure:12238: checking whether to use Active Directory" >&5 +echo "configure:12235: checking whether to use Active Directory" >&5 # Check whether --with-ads or --without-ads was given. if test "${with_ads+set}" = set; then @@ -12262,7 +12259,7 @@ if test x"$with_ads_support" = x"yes"; then ################################################# # check for location of Kerberos 5 install echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:12266: checking for kerberos 5 install path" >&5 +echo "configure:12263: checking for kerberos 5 install path" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -12290,7 +12287,7 @@ if test x$FOUND_KRB5 = x"no"; then ################################################# # see if this box has the SuSE location for the heimdal kerberos implementation echo $ac_n "checking for /usr/include/heimdal""... $ac_c" 1>&6 -echo "configure:12294: checking for /usr/include/heimdal" >&5 +echo "configure:12291: checking for /usr/include/heimdal" >&5 if test -d /usr/include/heimdal; then CFLAGS="$CFLAGS -I/usr/include/heimdal" CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal" @@ -12305,7 +12302,7 @@ if test x$FOUND_KRB5 = x"no"; then ################################################# # see if this box has the RedHat location for kerberos echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:12309: checking for /usr/kerberos" >&5 +echo "configure:12306: checking for /usr/kerberos" >&5 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" @@ -12324,17 +12321,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12328: checking for $ac_hdr" >&5 +echo "configure:12325: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12367,17 +12364,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12371: checking for $ac_hdr" >&5 +echo "configure:12368: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12407,7 +12404,7 @@ done ################################################################## # we might need the k5crypto and com_err libraries on some systems echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12411: checking for _et_list in -lcom_err" >&5 +echo "configure:12408: checking for _et_list in -lcom_err" >&5 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12415,7 +12412,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12447,7 +12444,7 @@ else fi echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12451: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo "configure:12448: checking for krb5_encrypt_data in -lk5crypto" >&5 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12455,7 +12452,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12491,7 +12488,7 @@ fi # now see if we can find the krb5 libs in standard paths # or as specified above echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12495: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo "configure:12492: checking for krb5_mk_req_extended in -lkrb5" >&5 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12499,7 +12496,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12538,7 +12535,7 @@ fi ######################################################## # now see if we can find the gssapi libs in standard paths echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12542: checking for gss_display_status in -lgssapi_krb5" >&5 +echo "configure:12539: checking for gss_display_status in -lgssapi_krb5" >&5 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12546,7 +12543,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi_krb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12588,7 +12585,7 @@ fi with_ldap_support=yes echo $ac_n "checking whether to use LDAP""... $ac_c" 1>&6 -echo "configure:12592: checking whether to use LDAP" >&5 +echo "configure:12589: checking whether to use LDAP" >&5 # Check whether --with-ldap or --without-ldap was given. if test "${with_ldap+set}" = set; then @@ -12609,7 +12606,7 @@ if test x"$with_ldap_support" = x"yes"; then # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12613: checking for ber_scanf in -llber" >&5 +echo "configure:12610: checking for ber_scanf in -llber" >&5 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12617,7 +12614,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12653,7 +12650,7 @@ fi # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12657: checking for ldap_domain2hostlist in -lldap" >&5 +echo "configure:12654: checking for ldap_domain2hostlist in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12661,7 +12658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lldap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12703,12 +12700,12 @@ fi for ac_func in ldap_set_rebind_proc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12707: checking for $ac_func" >&5 +echo "configure:12704: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12756,13 +12753,13 @@ fi done echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12760: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo "configure:12757: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12771,7 +12768,7 @@ int main() { ldap_set_rebind_proc(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pam_ldap_cv_ldap_set_rebind_proc=3 else @@ -12835,7 +12832,7 @@ fi # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12839: checking for $ac_word" >&5 +echo "configure:12836: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MYSQL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12870,7 +12867,7 @@ fi min_mysql_version=0.11.0 echo $ac_n "checking for MYSQL - version >= $min_mysql_version""... $ac_c" 1>&6 -echo "configure:12874: checking for MYSQL - version >= $min_mysql_version" >&5 +echo "configure:12871: checking for MYSQL - version >= $min_mysql_version" >&5 no_mysql="" if test "$MYSQL_CONFIG" = "no" ; then no_mysql=yes @@ -12894,7 +12891,7 @@ echo "configure:12874: checking for MYSQL - version >= $min_mysql_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -12955,7 +12952,7 @@ int major, minor, micro; EOF -if { (eval echo configure:12959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12989,7 +12986,7 @@ fi CFLAGS="$CFLAGS $MYSQL_CFLAGS" LIBS="$LIBS $MYSQL_LIBS" cat > conftest.$ac_ext < @@ -13004,7 +13001,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:13008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding MYSQL or finding the wrong" @@ -13084,7 +13081,7 @@ fi # Extract the first word of "xml2-config", so it can be a program name with args. set dummy xml2-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13088: checking for $ac_word" >&5 +echo "configure:13085: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XML2_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13119,7 +13116,7 @@ fi min_xml_version=2.0.0 echo $ac_n "checking for libxml - version >= $min_xml_version""... $ac_c" 1>&6 -echo "configure:13123: checking for libxml - version >= $min_xml_version" >&5 +echo "configure:13120: checking for libxml - version >= $min_xml_version" >&5 no_xml="" if test "$XML2_CONFIG" = "no" ; then no_xml=yes @@ -13142,7 +13139,7 @@ echo "configure:13123: checking for libxml - version >= $min_xml_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -13221,7 +13218,7 @@ main() } EOF -if { (eval echo configure:13225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -13256,7 +13253,7 @@ fi CFLAGS="$CFLAGS $XML_CFLAGS" LIBS="$LIBS $XML_LIBS" cat > conftest.$ac_ext < @@ -13266,7 +13263,7 @@ int main() { LIBXML_TEST_VERSION; return 0; ; return 0; } EOF -if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBXML or finding the wrong" @@ -13306,7 +13303,7 @@ CFLAGS="$CFLAGS $XML_CFLAGS" ################################################# # check for automount support echo $ac_n "checking whether to use automount""... $ac_c" 1>&6 -echo "configure:13310: checking whether to use automount" >&5 +echo "configure:13307: checking whether to use automount" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -13331,7 +13328,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use smbmount""... $ac_c" 1>&6 -echo "configure:13335: checking whether to use smbmount" >&5 +echo "configure:13332: checking whether to use smbmount" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -13366,7 +13363,7 @@ fi # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:13370: checking whether to use PAM" >&5 +echo "configure:13367: checking whether to use PAM" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -13392,7 +13389,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:13396: checking for pam_get_data in -lpam" >&5 +echo "configure:13393: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13400,7 +13397,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13438,7 +13435,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:13442: checking whether to use pam_smbpass" >&5 +echo "configure:13439: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -13474,12 +13471,12 @@ if test x"$with_pam_for_crypt" = x"no"; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13478: checking for $ac_func" >&5 +echo "configure:13475: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13528,7 +13525,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:13532: checking for crypt in -lcrypt" >&5 +echo "configure:13529: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13536,7 +13533,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13582,7 +13579,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:13586: checking for a crypt that needs truncated salt" >&5 +echo "configure:13583: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13593,11 +13590,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -13624,7 +13621,7 @@ fi # New experimental SAM system echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6 -echo "configure:13628: checking whether to build the new (experimental) SAM database" >&5 +echo "configure:13625: checking whether to build the new (experimental) SAM database" >&5 # Check whether --with-sam or --without-sam was given. if test "${with_sam+set}" = set; then withval="$with_sam" @@ -13656,7 +13653,7 @@ fi ################################################# # check for a LDAP password database configuration backwards compatibility echo $ac_n "checking whether to use LDAP SAM 2.2 compatible configuration""... $ac_c" 1>&6 -echo "configure:13660: checking whether to use LDAP SAM 2.2 compatible configuration" >&5 +echo "configure:13657: checking whether to use LDAP SAM 2.2 compatible configuration" >&5 # Check whether --with-ldapsam or --without-ldapsam was given. if test "${with_ldapsam+set}" = set; then withval="$with_ldapsam" @@ -13681,7 +13678,7 @@ fi ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:13685: checking whether to use TDB SAM database" >&5 +echo "configure:13682: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -13706,7 +13703,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:13710: checking whether to use NISPLUS SAM database" >&5 +echo "configure:13707: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -13737,7 +13734,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:13741: checking whether to use NISPLUS_HOME" >&5 +echo "configure:13738: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -13762,7 +13759,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:13766: checking whether to use syslog logging" >&5 +echo "configure:13763: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -13787,7 +13784,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:13791: checking whether to use profiling" >&5 +echo "configure:13788: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -13815,7 +13812,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:13819: checking whether to support disk-quotas" >&5 +echo "configure:13816: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -13826,13 +13823,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:13830: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:13827: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13844,7 +13841,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:13848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -13893,7 +13890,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:13897: checking whether to support utmp accounting" >&5 +echo "configure:13894: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -13918,7 +13915,7 @@ fi ################################################# # choose native language(s) of man pages echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13922: checking chosen man pages' language(s)" >&5 +echo "configure:13919: checking chosen man pages' language(s)" >&5 # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" @@ -13949,7 +13946,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13953: checking whether to build the libsmbclient shared library" >&5 +echo "configure:13950: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -13977,14 +13974,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13981: checking how to get filesystem space usage" >&5 +echo "configure:13978: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13988: checking statvfs64 function (SVR4)" >&5 +echo "configure:13985: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13992,7 +13989,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -14039,12 +14036,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:14043: checking statvfs function (SVR4)" >&5 +echo "configure:14040: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -14052,7 +14049,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:14056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -14077,7 +14074,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:14081: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:14078: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14085,7 +14082,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -14098,7 +14095,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:14102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -14125,7 +14122,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:14129: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:14126: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14133,7 +14130,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -14179,7 +14176,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:14183: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:14180: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14187,7 +14184,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -14197,7 +14194,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:14201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -14224,7 +14221,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:14228: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:14225: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14232,7 +14229,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -14248,7 +14245,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:14252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -14275,7 +14272,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:14279: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:14276: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14283,7 +14280,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -14303,7 +14300,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:14307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -14336,9 +14333,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:14340: checking if large file support can be enabled" >&5 +echo "configure:14337: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -14416,7 +14413,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:14420: checking whether to support ACLs" >&5 +echo "configure:14417: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -14469,7 +14466,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:14473: checking for acl_get_file in -lacl" >&5 +echo "configure:14470: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14477,7 +14474,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14516,13 +14513,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:14520: checking for ACL support" >&5 +echo "configure:14517: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -14530,7 +14527,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:14534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -14550,13 +14547,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:14554: checking for acl_get_perm_np" >&5 +echo "configure:14551: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -14564,7 +14561,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:14568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -14610,7 +14607,7 @@ fi with_sendfile_support=yes echo $ac_n "checking whether to check to support sendfile""... $ac_c" 1>&6 -echo "configure:14614: checking whether to check to support sendfile" >&5 +echo "configure:14611: checking whether to check to support sendfile" >&5 # Check whether --with-sendfile-support or --without-sendfile-support was given. if test "${with_sendfile_support+set}" = set; then withval="$with_sendfile_support" @@ -14622,13 +14619,13 @@ if test "${with_sendfile_support+set}" = set; then case "$host_os" in *linux*) echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6 -echo "configure:14626: checking for linux sendfile64 support" >&5 +echo "configure:14623: checking for linux sendfile64 support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14640,7 +14637,7 @@ ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); ; return 0; } EOF -if { (eval echo configure:14644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE64=yes else @@ -14655,13 +14652,13 @@ fi echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6 -echo "configure:14659: checking for linux sendfile support" >&5 +echo "configure:14656: checking for linux sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -14673,7 +14670,7 @@ ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); ; return 0; } EOF -if { (eval echo configure:14677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE=yes else @@ -14689,13 +14686,13 @@ echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 # Try and cope with broken Linux sendfile.... echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6 -echo "configure:14693: checking for broken linux sendfile support" >&5 +echo "configure:14690: checking for broken linux sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes else @@ -14767,35 +14764,36 @@ EOF ;; *freebsd*) echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6 -echo "configure:14771: checking for freebsd sendfile support" >&5 +echo "configure:14768: checking for freebsd sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include #include #include int main() { \ - int fromfd, tofd; + int fromfd, tofd, ret, total=0; off_t offset, nwritten; struct sf_hdtr hdr; struct iovec hdtrl; - hdr->headers = &hdtrl; - hdr->hdr_cnt = 1; - hdr->trailers = NULL; - hdr->trl_cnt = 0; + hdr.headers = &hdtrl; + hdr.hdr_cnt = 1; + hdr.trailers = NULL; + hdr.trl_cnt = 0; hdtrl.iov_base = NULL; hdtrl.iov_len = 0; - int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); + ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); ; return 0; } EOF -if { (eval echo configure:14799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE=yes else @@ -14829,13 +14827,13 @@ EOF *hpux*) echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6 -echo "configure:14833: checking for hpux sendfile64 support" >&5 +echo "configure:14831: checking for hpux sendfile64 support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14855,7 +14853,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE64=yes else @@ -14886,13 +14884,13 @@ EOF fi echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6 -echo "configure:14890: checking for hpux sendfile support" >&5 +echo "configure:14888: checking for hpux sendfile support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14912,7 +14910,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILE=yes else @@ -14945,7 +14943,7 @@ EOF *solaris*) echo $ac_n "checking for sendfilev in -lsendfile""... $ac_c" 1>&6 -echo "configure:14949: checking for sendfilev in -lsendfile" >&5 +echo "configure:14947: checking for sendfilev in -lsendfile" >&5 ac_lib_var=`echo sendfile'_'sendfilev | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14953,7 +14951,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsendfile $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14992,13 +14990,13 @@ else fi echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6 -echo "configure:14996: checking for solaris sendfilev64 support" >&5 +echo "configure:14994: checking for solaris sendfilev64 support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -15025,7 +15023,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILEV64=yes else @@ -15057,13 +15055,13 @@ EOF fi echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6 -echo "configure:15061: checking for solaris sendfilev support" >&5 +echo "configure:15059: checking for solaris sendfilev support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -15090,7 +15088,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_SENDFILEV=yes else @@ -15142,7 +15140,7 @@ fi # build and install client programs, sbin programs and shared libraries echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:15146: checking whether to build winbind" >&5 +echo "configure:15144: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -15226,20 +15224,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:15230: checking whether struct passwd has pw_comment" >&5 +echo "configure:15228: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:15243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -15264,20 +15262,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:15268: checking whether struct passwd has pw_age" >&5 +echo "configure:15266: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:15281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -15316,7 +15314,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:15320: checking for poptGetContext in -lpopt" >&5 +echo "configure:15318: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15324,7 +15322,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15359,7 +15357,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:15363: checking whether to use included popt" >&5 +echo "configure:15361: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""yes" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -15413,16 +15411,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:15417: checking configure summary" >&5 +echo "configure:15415: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else diff --git a/source3/configure.in b/source3/configure.in index ee2997abe6..c5a8a069ee 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2845,20 +2845,21 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)] AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[ AC_TRY_LINK([\ #include +#include #include #include ], [\ - int fromfd, tofd; + int fromfd, tofd, ret, total=0; off_t offset, nwritten; struct sf_hdtr hdr; struct iovec hdtrl; - hdr->headers = &hdtrl; - hdr->hdr_cnt = 1; - hdr->trailers = NULL; - hdr->trl_cnt = 0; + hdr.headers = &hdtrl; + hdr.hdr_cnt = 1; + hdr.trailers = NULL; + hdr.trl_cnt = 0; hdtrl.iov_base = NULL; hdtrl.iov_len = 0; - int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); + ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); ], samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) -- cgit From 10c50fb5800b0ba11b52bce1c7a1a7d0de48a79f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 28 Dec 2002 01:23:34 +0000 Subject: Patch for coredump with missing arg from "Bradley W. Langhorst" Jeremy. (This used to be commit 5914c38a54fcfdb007352b152dc2206708d59af6) --- source3/utils/pdbedit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 45a63c4b64..773af7c79a 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -495,7 +495,14 @@ int main (int argc, char **argv) poptGetArg(pc); /* Drop argv[0], the program name */ if (user_name == NULL) { - user_name = poptGetArg(pc); + if (poptPeekArg(pc) == NULL) { + fprintf(stderr, "Can't use pdbedit without a username\n"); + poptPrintHelp(pc, stderr, 0); + exit(1); + } else { + /*Don't try to duplicate a null string */ + user_name = strdup(poptGetArg(pc)); + } } if (!lp_load(dyn_CONFIGFILE,True,False,False)) { -- cgit From 5bee95239bb1eda4d6273b6978e1c6782a23331e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 28 Dec 2002 13:42:54 +0000 Subject: some more work on gums. - Building a tdbsam2 backend to see what I got right and what not about the proposed API - Corrections to API based on tdbsam2 work (This used to be commit 54f11b7de84233209b7db2d01d876f9c6c6340d6) --- source3/sam/gumm_tdb.c | 548 ++++++++++++++++++++++++++++++++++++++++++++++--- source3/sam/gums.c | 4 +- source3/sam/gums_api.c | 17 +- 3 files changed, 533 insertions(+), 36 deletions(-) (limited to 'source3') diff --git a/source3/sam/gumm_tdb.c b/source3/sam/gumm_tdb.c index 967890e99c..52eaab9e17 100644 --- a/source3/sam/gumm_tdb.c +++ b/source3/sam/gumm_tdb.c @@ -23,48 +23,540 @@ */ #include "includes.h" +#include "gums.h" +#include "tdbsam2.h" +#include "tdbsam2_parse_info.h" static int tdbgumm_debug_level = DBGC_ALL; #undef DBGC_CLASS #define DBGC_CLASS tdbgumm_debug_level -#define GUMM_VERSION "20021012" -#define TDB_FILE_NAME "gums_storage.tdb" -#define TDB_FORMAT_STRING "B" -#define DOMAIN_PREFIX "DOMAIN_" -#define USER_PREFIX "USER_" -#define GROUP_PREFIX "GROUP_" -#define SID_PREFIX "SID_" - -static TDB_CONTEXT *gumm_tdb = NULL; - -/*************************************************************** - objects enumeration. -****************************************************************/ - -static NTSTATUS enumerate_objects(DOM_SID **sids, const DOM_SID *sid, const int obj_type); -{ - TDB_CONTEXT *enum_tdb = NULL; - TDB_DATA key; - - /* Open tdb gums module */ - if (!(enum_tdb = tdb_open_log(TDB_FILE_NAME, 0, TDB_DEFAULT, update?(O_RDWR|O_CREAT):O_RDONLY, 0600))) - { - DEBUG(0, ("Unable to open/create gumm tdb database\n")); +#define TDBSAM_VERSION "20021215" +#define TDB_FILE_NAME "tdbsam2.tdb" +#define DOMAINPREFIX "DOMAIN_" +#define OBJECTPREFIX "OBJECT_" +#define SIDPREFIX "SID_" +#define PRIVILEGEPREFIX "PRIV_" + +#define TDB_FORMAT_STRING "ddB" + +union tdbsam2_data { + struct tdbsam2_domain_data *domain; + struct tdbsam2_user_data *user; + struct tdbsam2_group_data *group; +}; + +struct tdbsam2_object { + uint32 type; + union tdbsam2_data data; +}; + +static TDB_CONTEXT *tdbsam2_db; + +#define TALLOC_CHECK(ptr, err, label) do { if ((ptr) == NULL) { DEBUG(0, ("%s: Out of memory!\n", __FUNCTION__)); err = NT_STATUS_NO_MEMORY; goto label; } } while(0) +#define SET_OR_FAIL(func, label) do { if (NT_STATUS_IS_ERR(func)) { DEBUG(0, ("%s: Setting gums object data failed!\n", __FUNCTION__)); goto label; } } while(0) + +static NTSTATUS init_tdbsam2_object_from_buffer(struct tdbsam2_object *object, TALLOC_CTX *mem_ctx, char *buffer, int size) { + + return NT_STATUS_OK; +} + +static NTSTATUS tdbsam2_opentdb(void) { + + return NT_STATUS_OK; +} + +static NTSTATUS tdbsam2_get_object_by_name(struct tdbsam2_object *obj, TALLOC_CTX *mem_ctx, const char* name) { + + NTSTATUS ret; + TDB_DATA data, key; + fstring keystr; + fstring objname; + + if (!obj || !mem_ctx || !name) + return NT_STATUS_INVALID_PARAMETER; + + if (tdbsam2_db == NULL) { + if (NT_STATUS_IS_ERR(ret = tdbsam2_opentdb())) { + goto done; + } + } + + unix_strlower(name, -1, objname, sizeof(objname)); + + slprintf(keystr, sizeof(keystr)-1, "%s%s", OBJECTPREFIX, objname); + key.dptr = keystr; + key.dsize = strlen(keystr) + 1; + + data = tdb_fetch(tdbsam2_db, key); + if (!data.dptr) { + DEBUG(5, ("get_domain_sid: Error fetching database, domain entry not found!\n")); + DEBUGADD(5, (" Error: %s\n", tdb_errorstr(tdbsam2_db))); + DEBUGADD(5, (" Key: %s\n", keystr)); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + if (NT_STATUS_IS_ERR(init_tdbsam2_object_from_buffer(obj, mem_ctx, data.dptr, data.dsize))) { + SAFE_FREE(data.dptr); + DEBUG(0, ("get_domain_sid: Error fetching database, malformed entry!\n")); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + SAFE_FREE(data.dptr); + + ret = NT_STATUS_OK; + +done: + return ret; +} + + +static NTSTATUS tdbsam2_store(struct tdbsam2_object *object) { + + NTSTATUS ret; + + return NT_STATUS_OK; +} + +static NTSTATUS tdbsam2_get_next_sid(TALLOC_CTX *mem_ctx, DOM_SID *sid) { + + NTSTATUS ret; + + return NT_STATUS_OK; +} + +static NTSTATUS tdbsam2_user_data_to_gums_object(GUMS_OBJECT **object, struct tdbsam2_user_data *userdata, uint32 type) { + + NTSTATUS ret; + + if (!object || !userdata) { + DEBUG(0, ("tdbsam2_user_data_to_gums_object: no NULL pointers are accepted here!\n")); + return NT_STATUS_UNSUCCESSFUL; + } + + /* userdata->xcounter */ + /* userdata->sec_desc */ + + SET_OR_FAIL(gums_set_object_sid(*object, userdata->user_sid), error); + SET_OR_FAIL(gums_set_object_name(*object, userdata->name), error); + + SET_OR_FAIL(gums_set_user_pri_group(*object, userdata->group_sid), error); + + if (userdata->description) + SET_OR_FAIL(gums_set_object_description(*object, userdata->description), error); + + if (userdata->full_name) + SET_OR_FAIL(gums_set_user_fullname(*object, userdata->full_name), error); + + if (userdata->home_dir) + SET_OR_FAIL(gums_set_user_homedir(*object, userdata->home_dir), error); + + if (userdata->dir_drive) + SET_OR_FAIL(gums_set_user_dir_drive(*object, userdata->dir_drive), error); + + if (userdata->logon_script) + SET_OR_FAIL(gums_set_user_logon_script(*object, userdata->logon_script), error); + + if (userdata->profile_path) + SET_OR_FAIL(gums_set_user_profile_path(*object, userdata->profile_path), error); + + if (userdata->workstations) + SET_OR_FAIL(gums_set_user_workstations(*object, userdata->workstations), error); + + if (userdata->unknown_str) + SET_OR_FAIL(gums_set_user_unknown_str(*object, userdata->unknown_str), error); + + if (userdata->munged_dial) + SET_OR_FAIL(gums_set_user_munged_dial(*object, userdata->munged_dial), error); + + SET_OR_FAIL(gums_set_user_logon_divs(*object, userdata->logon_divs), error); + SET_OR_FAIL(gums_set_user_hours_len(*object, userdata->hours_len), error); + + if (userdata->hours) + SET_OR_FAIL(gums_set_user_hours(*object, userdata->hours), error); + + SET_OR_FAIL(gums_set_user_unknown_3(*object, userdata->unknown_3), error); + SET_OR_FAIL(gums_set_user_unknown_5(*object, userdata->unknown_5), error); + SET_OR_FAIL(gums_set_user_unknown_6(*object, userdata->unknown_6), error); + + SET_OR_FAIL(gums_set_user_logon_time(*object, userdata->logon_time), error); + SET_OR_FAIL(gums_set_user_logoff_time(*object, userdata->logoff_time), error); + SET_OR_FAIL(gums_set_user_kickoff_time(*object, userdata->kickoff_time), error); + SET_OR_FAIL(gums_set_user_pass_last_set_time(*object, userdata->pass_last_set_time), error); + SET_OR_FAIL(gums_set_user_pass_can_change_time(*object, userdata->pass_can_change_time), error); + SET_OR_FAIL(gums_set_user_pass_must_change_time(*object, userdata->pass_must_change_time), error); + + ret = NT_STATUS_OK; + return ret; + +error: + talloc_destroy((*object)->mem_ctx); + *object = NULL; + return ret; +} + +static NTSTATUS tdbsam2_group_data_to_gums_object(GUMS_OBJECT **object, struct tdbsam2_group_data *groupdata, uint32 type) { + + NTSTATUS ret; + + if (!object || !groupdata) { + DEBUG(0, ("tdbsam2_group_data_to_gums_object: no NULL pointers are accepted here!\n")); return NT_STATUS_UNSUCCESSFUL; } + + /* groupdata->xcounter */ + /* groupdata->sec_desc */ + + SET_OR_FAIL(gums_set_object_sid(*object, groupdata->group_sid), error); + SET_OR_FAIL(gums_set_object_name(*object, groupdata->name), error); + + if (groupdata->description) + SET_OR_FAIL(gums_set_object_description(*object, groupdata->description), error); + + if (groupdata->count) + SET_OR_FAIL(gums_set_group_members(*object, groupdata->count, groupdata->members), error); + + ret = NT_STATUS_OK; + return ret; - enum_key = tdb_firstkey(enum_tdb); +error: + talloc_destroy((*object)->mem_ctx); + *object = NULL; + return ret; +} +static NTSTATUS tdbsam2_domain_data_to_gums_object(GUMS_OBJECT **object, struct tdbsam2_domain_data *domdata, uint32 type) { + NTSTATUS ret; - tdb_close(enum_tdb); + if (!object || !domdata) { + DEBUG(0, ("tdbsam2_domain_data_to_gums_object: no NULL pointers are accepted here!\n")); + return NT_STATUS_UNSUCCESSFUL; + } - return NT_STATUS_OK; + /* domdata->xcounter */ + /* domdata->sec_desc */ + + SET_OR_FAIL(gums_set_object_sid(*object, domdata->dom_sid), error); + SET_OR_FAIL(gums_set_object_name(*object, domdata->name), error); + + if (domdata->description) + SET_OR_FAIL(gums_set_object_description(*object, domdata->description), error); + + ret = NT_STATUS_OK; + return ret; + +error: + talloc_destroy((*object)->mem_ctx); + *object = NULL; + return ret; +} + +static NTSTATUS tdbsam2_data_to_gums_object(GUMS_OBJECT **object, struct tdbsam2_object *data) { + + NTSTATUS ret; + + if (!object || !data) { + DEBUG(0, ("tdbsam2_user_data_to_gums_object: no NULL structure pointers are accepted here!\n")); + ret = NT_STATUS_INVALID_PARAMETER; + goto done; + } + + ret = gums_create_object(object, data->type); + if (NT_STATUS_IS_ERR(ret)) { + DEBUG(5, ("tdbsam2_user_data_to_gums_object: error creating gums object!\n")); + goto done; + } + + switch (data->type) { + case GUMS_OBJ_DOMAIN: + ret = tdbsam2_domain_data_to_gums_object(object, data->data.domain, data->type); + break; + + case GUMS_OBJ_NORMAL_USER: + ret = tdbsam2_user_data_to_gums_object(object, data->data.user, data->type); + break; + + case GUMS_OBJ_GROUP: + case GUMS_OBJ_ALIAS: + ret = tdbsam2_group_data_to_gums_object(object, data->data.group, data->type); + break; + + default: + ret = NT_STATUS_UNSUCCESSFUL; + } + +done: + return ret; +} + + + + + +/* GUMM object functions */ + +static NTSTATUS get_domain_sid(DOM_SID *sid, const char* name) { + + NTSTATUS ret; + struct tdbsam2_object obj; + TALLOC_CTX *mem_ctx; + TDB_DATA data, key; + fstring keystr; + fstring domname; + + if (!sid || !name) + return NT_STATUS_INVALID_PARAMETER; + + mem_ctx = talloc_init("get_domain_sid"); + if (!mem_ctx) { + DEBUG(0, ("tdbsam2_new_object: Out of memory!\n")); + return NT_STATUS_NO_MEMORY; + } + + if (tdbsam2_db == NULL) { + if (NT_STATUS_IS_ERR(ret = tdbsam2_opentdb())) { + goto done; + } + } + + unix_strlower(name, -1, domname, sizeof(domname)); + + slprintf(keystr, sizeof(keystr)-1, "%s%s", DOMAINPREFIX, domname); + key.dptr = keystr; + key.dsize = strlen(keystr) + 1; + + data = tdb_fetch(tdbsam2_db, key); + if (!data.dptr) { + DEBUG(5, ("get_domain_sid: Error fetching database, domain entry not found!\n")); + DEBUGADD(5, (" Error: %s\n", tdb_errorstr(tdbsam2_db))); + DEBUGADD(5, (" Key: %s\n", keystr)); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + if (NT_STATUS_IS_ERR(init_tdbsam2_object_from_buffer(&obj, mem_ctx, data.dptr, data.dsize))) { + SAFE_FREE(data.dptr); + DEBUG(0, ("get_domain_sid: Error fetching database, malformed entry!\n")); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + SAFE_FREE(data.dptr); + + if (obj.type != GUMS_OBJ_DOMAIN) { + DEBUG(5, ("get_domain_sid: Requested object is not a domain!\n")); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + sid_copy(sid, obj.data.domain->dom_sid); + + ret = NT_STATUS_OK; + +done: + if (mem_ctx) talloc_destroy(mem_ctx); + return ret; +} + + NTSTATUS (*set_domain_sid) (const DOM_SID *sid, const char *name); + + NTSTATUS (*get_sequence_number) (void); + + +static NTSTATUS tdbsam2_new_object(DOM_SID **sid, const char *name, const int obj_type) { + + NTSTATUS ret; + struct tdbsam2_object obj; + TALLOC_CTX *mem_ctx; + + if (!sid || !name) { + DEBUG(0, ("tdbsam2_new_object: no NULL pointers are accepted here!\n")); + return NT_STATUS_INVALID_PARAMETER; + } + + mem_ctx = talloc_init("tdbsam2_new_object"); + if (!mem_ctx) { + DEBUG(0, ("tdbsam2_new_object: Out of memory!\n")); + return NT_STATUS_NO_MEMORY; + } + + switch (obj_type) { + case GUMS_OBJ_NORMAL_USER: + obj.data.user = (struct tdbsam2_user_data *)talloc_zero(mem_ctx, sizeof(struct tdbsam2_user_data)); + TALLOC_CHECK(obj.data.user, ret, done); + + /*obj.data.user->sec_desc*/ + + tdbsam2_get_next_sid(mem_ctx, obj.data.user->user_sid); + TALLOC_CHECK(obj.data.user->user_sid, ret, done); + + obj.data.user->name = talloc_strdup(mem_ctx, name); + TALLOC_CHECK(obj.data.user, ret, done); + + break; + + case GUMS_OBJ_GROUP: + case GUMS_OBJ_ALIAS: + obj.data.group = (struct tdbsam2_group_data *)talloc_zero(mem_ctx, sizeof(struct tdbsam2_group_data)); + TALLOC_CHECK(obj.data.group, ret, done); + + /*obj.data.user->sec_desc*/ + + tdbsam2_get_next_sid(mem_ctx, obj.data.group->group_sid); + TALLOC_CHECK(obj.data.group->group_sid, ret, done); + + obj.data.group->name = talloc_strdup(mem_ctx, name); + TALLOC_CHECK(obj.data.group, ret, done); + + break; + + case GUMS_OBJ_DOMAIN: + /* TODO: SHOULD WE ALLOW TO CREATE NEW DOMAINS ? */ + + default: + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + ret = tdbsam2_store(&obj); + +done: + talloc_destroy(mem_ctx); + return ret; } +static NTSTATUS tdbsam2_delete_object(const DOM_SID *sid) { + + NTSTATUS ret; + struct tdbsam2_object obj; + TALLOC_CTX *mem_ctx; + TDB_DATA data, key; + fstring keystr; + fstring sidstr; + char *obj_name = NULL; + int obj_type, obj_version, len; + + if (!sid) { + DEBUG(0, ("tdbsam2_new_object: no NULL pointers are accepted here!\n")); + return NT_STATUS_INVALID_PARAMETER; + } + + mem_ctx = talloc_init("tdbsam2_delete_object"); + if (!mem_ctx) { + DEBUG(0, ("tdbsam2_new_object: Out of memory!\n")); + return NT_STATUS_NO_MEMORY; + } + + if (tdbsam2_db == NULL) { + if (NT_STATUS_IS_ERR(ret = tdbsam2_opentdb())) { + goto done; + } + } + + sid_to_string(sidstr, sid); + + slprintf(keystr, sizeof(keystr)-1, "%s%s", SIDPREFIX, sidstr); + key.dptr = keystr; + key.dsize = strlen(keystr) + 1; + + data = tdb_fetch(tdbsam2_db, key); + if (!data.dptr) { + DEBUG(5, ("get_domain_sid: Error fetching database, SID entry not found!\n")); + DEBUGADD(5, (" Error: %s\n", tdb_errorstr(tdbsam2_db))); + DEBUGADD(5, (" Key: %s\n", keystr)); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } -static NTSTATUS module_init() -{ + len = tdb_unpack(data.dptr, data.dsize, TDB_FORMAT_STRING, + &obj_version, + &obj_type, + &obj_name); + + if (len == -1) { + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + if (tdb_delete(tdbsam2_db, key) != TDB_SUCCESS) { + DEBUG(5, ("tdbsam2_object_delete: Error deleting object!\n")); + DEBUGADD(5, (" Error: %s\n", tdb_errorstr(tdbsam2_db))); + DEBUGADD(5, (" Key: %s\n", keystr)); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + switch (obj_type) { + case GUMS_OBJ_NORMAL_USER: + case GUMS_OBJ_GROUP: + case GUMS_OBJ_ALIAS: + + slprintf(keystr, sizeof(keystr)-1, "%s%s", OBJECTPREFIX, obj_name); + key.dptr = keystr; + key.dsize = strlen(keystr) + 1; + + if (tdb_delete(tdbsam2_db, key) != TDB_SUCCESS) { + DEBUG(5, ("tdbsam2_object_delete: Error deleting object!\n")); + DEBUGADD(5, (" Error: %s\n", tdb_errorstr(tdbsam2_db))); + DEBUGADD(5, (" Key: %s\n", keystr)); + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + break; + + case GUMS_OBJ_DOMAIN: + /* TODO: SHOULD WE ALLOW TO DELETE DOMAINS ? */ + + default: + ret = NT_STATUS_UNSUCCESSFUL; + goto done; + } + +done: + SAFE_FREE(obj_name); + talloc_destroy(mem_ctx); + return ret; } + NTSTATUS (*get_object_from_sid) (GUMS_OBJECT **object, const DOM_SID *sid, const int obj_type); + NTSTATUS (*get_sid_from_name) (GUMS_OBJECT **object, const char *name); + /* This function is used to get the list of all objects changed since b_time, it is + used to support PDC<->BDC synchronization */ + NTSTATUS (*get_updated_objects) (GUMS_OBJECT **objects, const NTTIME base_time); + + NTSTATUS (*enumerate_objects_start) (void *handle, const DOM_SID *sid, const int obj_type); + NTSTATUS (*enumerate_objects_get_next) (GUMS_OBJECT **object, void *handle); + NTSTATUS (*enumerate_objects_stop) (void *handle); + + /* This function MUST be used ONLY by PDC<->BDC replication code or recovery tools. + Never use this function to update an object in the database, use set_object_values() */ + NTSTATUS (*set_object) (const GUMS_OBJECT *object); + + /* set object values function */ + NTSTATUS (*set_object_values) (DOM_SID *sid, uint32 count, GUMS_DATA_SET *data_set); + + /* Group related functions */ + NTSTATUS (*add_memberss_to_group) (const DOM_SID *group, const DOM_SID **members); + NTSTATUS (*delete_members_from_group) (const DOM_SID *group, const DOM_SID **members); + NTSTATUS (*enumerate_group_members) (DOM_SID **members, const DOM_SID *sid, const int type); + + NTSTATUS (*get_sid_groups) (DOM_SID **groups, const DOM_SID *sid); + + NTSTATUS (*lock_sid) (const DOM_SID *sid); + NTSTATUS (*unlock_sid) (const DOM_SID *sid); + + /* privileges related functions */ + + NTSTATUS (*add_members_to_privilege) (const LUID_ATTR *priv, const DOM_SID **members); + NTSTATUS (*delete_members_from_privilege) (const LUID_ATTR *priv, const DOM_SID **members); + NTSTATUS (*enumerate_privilege_members) (DOM_SID **members, const LUID_ATTR *priv); + NTSTATUS (*get_sid_privileges) (DOM_SID **privs, const DOM_SID *sid); + /* warning!: set_privilege will overwrite a prior existing privilege if such exist */ + NTSTATUS (*set_privilege) (GUMS_PRIVILEGE *priv); + + +int gumm_init(GUMS_FUNCTIONS **storage) { + + return 0; +} diff --git a/source3/sam/gums.c b/source3/sam/gums.c index c0376d6a1f..3a20ef6fc9 100644 --- a/source3/sam/gums.c +++ b/source3/sam/gums.c @@ -89,8 +89,8 @@ NTSTATUS gums_init(const char *module_name) DEBUG(1, ("WARNING: Module's minor version does not match gums version!\n")); } - module_open = sys_dlsym(dl_handle, "gumm_init"); - if (!module_open) { + module_init = sys_dlsym(dl_handle, "gumm_init"); + if (!module_init) { DEBUG(0, ("ERROR: Failed to find gums module's init function!\n")); goto error; } diff --git a/source3/sam/gums_api.c b/source3/sam/gums_api.c index df5faa42c1..75e32fa861 100644 --- a/source3/sam/gums_api.c +++ b/source3/sam/gums_api.c @@ -70,6 +70,7 @@ NTSTATUS gums_create_object(GUMS_OBJECT **obj, uint32 type) if (!(go->data)) { ret = NT_STATUS_NO_MEMORY; + DEBUG(0, ("gums_create_object: Out of memory!\n")); goto error; } @@ -666,6 +667,7 @@ NTSTATUS gums_get_user_hours(uint8 **hours, const GUMS_OBJECT *obj) return NT_STATUS_OK; } +/* WARNING: always set hours_len before hours */ NTSTATUS gums_set_user_hours(GUMS_OBJECT *obj, const uint8 *hours) { if (!obj || !hours) @@ -674,6 +676,9 @@ NTSTATUS gums_set_user_hours(GUMS_OBJECT *obj, const uint8 *hours) if (obj->type != GUMS_OBJ_NORMAL_USER) return NT_STATUS_OBJECT_TYPE_MISMATCH; + if (obj->data.user->hours_len == 0) + DEBUG(10, ("gums_set_user_hours: Warning, hours_len is zero!\n")); + obj->data.user->hours = (uint8 *)talloc_memdup(obj->mem_ctx, hours, obj->data.user->hours_len); if (!(obj->data.user->hours) & (obj->data.user->hours_len != 0)) return NT_STATUS_NO_MEMORY; return NT_STATUS_OK; @@ -767,11 +772,11 @@ NTSTATUS gums_get_group_members(uint32 *count, DOM_SID **members, const GUMS_OBJ return NT_STATUS_OK; } -NTSTATUS gums_set_group_members(GUMS_OBJECT *obj, uint32 count, const DOM_SID **members) +NTSTATUS gums_set_group_members(GUMS_OBJECT *obj, uint32 count, DOM_SID **members) { uint32 n; - if (!obj || !members) + if (!obj || !members || !members) return NT_STATUS_INVALID_PARAMETER; if (obj->type != GUMS_OBJ_GROUP && @@ -1035,12 +1040,12 @@ NTSTATUS gums_cs_set_munged_dial(TALLOC_CTX *mem_ctx, GUMS_COMMIT_SET *com_set, return gums_set_string(mem_ctx, com_set, GUMS_SET_NAME, munged_dial); } -NTSTATUS gums_cs_set_nttime(TALLOC_CTX *mem_ctx, GUMS_COMMIT_SET *com_set, uint32 type, NTTIME *time) +NTSTATUS gums_cs_set_nttime(TALLOC_CTX *mem_ctx, GUMS_COMMIT_SET *com_set, uint32 type, NTTIME *nttime) { GUMS_DATA_SET *data_set; NTTIME *new_time; - if (!mem_ctx || !com_set || !time || type < GUMS_SET_LOGON_TIME || type > GUMS_SET_PASS_MUST_CHANGE_TIME) + if (!mem_ctx || !com_set || !nttime || type < GUMS_SET_LOGON_TIME || type > GUMS_SET_PASS_MUST_CHANGE_TIME) return NT_STATUS_INVALID_PARAMETER; com_set->count = com_set->count + 1; @@ -1060,8 +1065,8 @@ NTSTATUS gums_cs_set_nttime(TALLOC_CTX *mem_ctx, GUMS_COMMIT_SET *com_set, uint3 if (new_time == NULL) return NT_STATUS_NO_MEMORY; - new_time->low = time->low; - new_time->high = time->high; + new_time->low = nttime->low; + new_time->high = nttime->high; (char *)(data_set->data) = new_time; return NT_STATUS_OK; -- cgit From 561a6634b25dad6c8225ce630cc4a25466f5f6f8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 28 Dec 2002 19:48:56 +0000 Subject: Revert by Simo's request. HEAD and 3.0 should be in sync for this except for the modules load. Jeremy. (This used to be commit c7c3afbd0de8bd8797f91d350368a2419fcede0e) --- source3/utils/pdbedit.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 773af7c79a..90ce3a6890 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -494,16 +494,8 @@ int main (int argc, char **argv) poptGetArg(pc); /* Drop argv[0], the program name */ - if (user_name == NULL) { - if (poptPeekArg(pc) == NULL) { - fprintf(stderr, "Can't use pdbedit without a username\n"); - poptPrintHelp(pc, stderr, 0); - exit(1); - } else { - /*Don't try to duplicate a null string */ - user_name = strdup(poptGetArg(pc)); - } - } + if (user_name == NULL) + user_name = poptGetArg(pc); if (!lp_load(dyn_CONFIGFILE,True,False,False)) { fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE); -- cgit From ab42271cd6d17b09409d5c8e5a2c80cf5ae4c1cf Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Sun, 29 Dec 2002 23:29:08 +0000 Subject: Add msdfs proxy functionality to HEAD. (This used to be commit 9df93b1ffc9ce98302540cc3d2cbd66787abc4fd) --- source3/msdfs/msdfs.c | 72 ++++++++++++++++++++++++++++++++---------------- source3/param/loadparm.c | 4 +++ source3/smbd/service.c | 7 +++++ 3 files changed, 59 insertions(+), 24 deletions(-) (limited to 'source3') diff --git a/source3/msdfs/msdfs.c b/source3/msdfs/msdfs.c index 3e66c1c10c..613382961b 100644 --- a/source3/msdfs/msdfs.c +++ b/source3/msdfs/msdfs.c @@ -381,6 +381,26 @@ BOOL get_referred_path(char *pathname, struct junction_map* jn, return False; } + if (*lp_msdfs_proxy(snum) != '\0') { + struct referral* ref; + jn->referral_count = 1; + if ((ref = (struct referral*) malloc(sizeof(struct referral))) + == NULL) { + DEBUG(0, ("malloc failed for referral\n")); + return False; + } + + pstrcpy(ref->alternate_path, lp_msdfs_proxy(snum)); + if (dp.reqpath[0] != '\0') + pstrcat(ref->alternate_path, dp.reqpath); + ref->proximity = 0; + ref->ttl = REFERRAL_TTL; + jn->referral_list = ref; + if (consumedcntp) + *consumedcntp = strlen(pathname); + return True; + } + /* If not remote & not a self referral, return False */ if (!resolve_dfs_path(pathname, &dp, conn, False, &jn->referral_list, &jn->referral_count, @@ -630,7 +650,7 @@ int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata) dbgtext(".\n"); } } - + /* create the referral depeding on version */ DEBUG(10,("max_referral_level :%d\n",max_referral_level)); if(max_referral_level<2 || max_referral_level>3) @@ -798,6 +818,7 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count) char* service_name = lp_servicename(snum); connection_struct conns; connection_struct *conn = &conns; + struct referral *ref = NULL; pstrcpy(connect_path,lp_pathname(snum)); @@ -811,31 +832,34 @@ static BOOL form_junctions(int snum, struct junction_map* jn, int* jn_count) if (!create_conn_struct(conn, snum, connect_path)) return False; - { - /* form a junction for the msdfs root - convention - DO NOT REMOVE THIS: NT clients will not work with us - if this is not present - */ - struct referral *ref = NULL; - pstring alt_path; - pstrcpy(jn[cnt].service_name, service_name); - jn[cnt].volume_name[0] = '\0'; - jn[cnt].referral_count = 1; - - slprintf(alt_path,sizeof(alt_path)-1,"\\\\%s\\%s", - local_machine, service_name); - ref = jn[cnt].referral_list = (struct referral*) malloc(sizeof(struct referral)); - if (jn[cnt].referral_list == NULL) { - DEBUG(0, ("Malloc failed!\n")); - return False; - } - - safe_strcpy(ref->alternate_path, alt_path, sizeof(pstring)); - ref->proximity = 0; - ref->ttl = REFERRAL_TTL; - cnt++; + /* form a junction for the msdfs root - convention + DO NOT REMOVE THIS: NT clients will not work with us + if this is not present + */ + pstrcpy(jn[cnt].service_name, service_name); + jn[cnt].volume_name[0] = '\0'; + jn[cnt].referral_count = 1; + + ref = jn[cnt].referral_list + = (struct referral*) malloc(sizeof(struct referral)); + if (jn[cnt].referral_list == NULL) { + DEBUG(0, ("Malloc failed!\n")); + return False; } + ref->proximity = 0; + ref->ttl = REFERRAL_TTL; + if (*lp_msdfs_proxy(snum) != '\0') { + pstrcpy(ref->alternate_path, lp_msdfs_proxy(snum)); + *jn_count = 1; + return True; + } + + slprintf(ref->alternate_path, sizeof(pstring)-1, + "\\\\%s\\%s", local_machine, service_name); + cnt++; + + /* Now enumerate all dfs links */ dirp = conn->vfs_ops.opendir(conn, connect_path); if(!dirp) return False; diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 02f120b534..621aa67e6a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -328,6 +328,7 @@ typedef struct char *szVfsObjectFile; char *szVfsOptions; char *szVfsPath; + char *szMSDfsProxy; int iMinPrintSpace; int iMaxPrintJobs; int iWriteCacheSize; @@ -447,6 +448,7 @@ static service sDefault = { NULL, /* vfs object */ NULL, /* vfs options */ NULL, /* vfs path */ + NULL, /* szMSDfsProxy */ 0, /* iMinPrintSpace */ 1000, /* iMaxPrintJobs */ 0, /* iWriteCacheSize */ @@ -1091,6 +1093,7 @@ static struct parm_struct parm_table[] = { {"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, + {"msdfs proxy", P_STRING, P_LOCAL, &sDefault.szMSDfsProxy, NULL, NULL, FLAG_SHARE}, {"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, {"Winbind options", P_SEP, P_SEPARATOR}, @@ -1739,6 +1742,7 @@ FN_LOCAL_STRING(lp_fstype, fstype) FN_LOCAL_STRING(lp_vfsobj, szVfsObjectFile) FN_LOCAL_STRING(lp_vfs_options, szVfsOptions) FN_LOCAL_STRING(lp_vfs_path, szVfsPath) +FN_LOCAL_STRING(lp_msdfs_proxy, szMSDfsProxy) static FN_LOCAL_STRING(lp_volume, volume) FN_LOCAL_STRING(lp_mangled_map, szMangledMap) FN_LOCAL_STRING(lp_veto_files, szVetoFiles) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 1f168dd3ff..d00c908a1a 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -833,6 +833,13 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password, return NULL; } + /* Handle non-Dfs clients attempting connections to msdfs proxy */ + if (lp_host_msdfs() && (*lp_msdfs_proxy(snum) != '\0')) { + DEBUG(3, ("refusing connection to dfs proxy '%s'\n", service)); + *status = NT_STATUS_BAD_NETWORK_NAME; + return NULL; + } + DEBUG(5, ("making a connection to 'normal' service %s\n", service)); return make_connection_snum(snum, vuser, -- cgit From 72caa1fc8d7161da65ddad011d7d624fe0d9fe0b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 Dec 2002 04:19:57 +0000 Subject: Add a new VFS module, that just fiddles the file permissions. Still need to make it fiddle with NT ACLs (or report no ACL, so Samba fakes it up). The idea here is that Samba reports an NT ACL to Windows clients, which use that ACL in downloaded profiles. If the user doesn't have write permissions on the directories being downloaded, then it cant put the subfolders in (yes, NT will set perms so that it can't access the dir as the user the created it) and the profile download fails. The current solution it to give the user unix write perms to the folders, but this is rather dangerous - sombody could trojen the profile. This should avoid that mess. I'll test this out properly next week, but it works in vfstest (thanks idra!). Andrew Bartlett (This used to be commit 1ad782282a3eb4f89c489a77ad8404099d41d0f9) --- source3/Makefile.in | 8 +- source3/modules/vfs_fake_perms.c | 471 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 478 insertions(+), 1 deletion(-) create mode 100644 source3/modules/vfs_fake_perms.c (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index a13197823c..e6e83d0c55 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -127,7 +127,7 @@ SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script QUOTAOBJS=@QUOTAOBJS@ -VFS_MODULES = bin/vfs_audit.@SHLIBEXT@ bin/vfs_recycle.@SHLIBEXT@ bin/vfs_netatalk.@SHLIBEXT@ +VFS_MODULES = bin/vfs_audit.@SHLIBEXT@ bin/vfs_recycle.@SHLIBEXT@ bin/vfs_netatalk.@SHLIBEXT@ bin/vfs_fake_perms.@SHLIBEXT@ PDB_MODULES = @MODULE_MYSQL@ @MODULE_XML@ MODULES = bin/developer.@SHLIBEXT@ @@ -463,6 +463,7 @@ VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OB VFS_AUDIT_OBJ = modules/vfs_audit.o VFS_RECYCLE_OBJ = modules/vfs_recycle.o VFS_NETATALK_OBJ = modules/vfs_netatalk.o +VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o LOCKTEST2_OBJ = torture/locktest2.o $(LOCKING_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) \ $(UBIQX_OBJ) $(LIB_OBJ) @@ -889,6 +890,11 @@ bin/vfs_netatalk.@SHLIBEXT@: $(VFS_NETATALK_OBJ) @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NETATALK_OBJ) \ @SONAMEFLAG@`basename $@` +bin/vfs_fake_perms.@SHLIBEXT@: $(VFS_FAKE_PERMS_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FAKE_PERMS_OBJ) \ + @SONAMEFLAG@`basename $@` + bin/wbinfo@EXEEXT@: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) \ $(UBIQX_OBJ) $(SECRETS_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ diff --git a/source3/modules/vfs_fake_perms.c b/source3/modules/vfs_fake_perms.c new file mode 100644 index 0000000000..7fbf27e907 --- /dev/null +++ b/source3/modules/vfs_fake_perms.c @@ -0,0 +1,471 @@ +/* + * Fake Perms VFS module. Implements passthrough operation of all VFS + * calls to disk functions, except for file permissions, which are now + * mode 0700 for the current uid/gid. + * + * Copyright (C) Tim Potter, 1999-2000 + * Copyright (C) Alexander Bokovoy, 2002 + * Copyright (C) Andrew Bartlett, 2002 + * + * 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. + */ + +#include "config.h" + +#include +#include +#ifdef HAVE_UTIME_H +#include +#endif +#ifdef HAVE_DIRENT_H +#include +#endif +#ifdef HAVE_FCNTL_H +#include +#endif +#include +#include + +#include +#include + +static struct vfs_ops default_vfs_ops; /* For passthrough operation */ +static struct smb_vfs_handle_struct *fake_perms_handle; /* use fake_perms_handle->data for storing per-instance private data */ + +static int fake_perms_connect(struct connection_struct *conn, const char *service, const char *user) +{ + return default_vfs_ops.connect(conn, service, user); +} + +static void fake_perms_disconnect(struct connection_struct *conn) +{ + default_vfs_ops.disconnect(conn); +} + +static SMB_BIG_UINT fake_perms_disk_free(struct connection_struct *conn, const char *path, + BOOL small_query, SMB_BIG_UINT *bsize, + SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) +{ + return default_vfs_ops.disk_free(conn, path, small_query, bsize, + dfree, dsize); +} + +static DIR *fake_perms_opendir(struct connection_struct *conn, const char *fname) +{ + return default_vfs_ops.opendir(conn, fname); +} + +static struct dirent *fake_perms_readdir(struct connection_struct *conn, DIR *dirp) +{ + return default_vfs_ops.readdir(conn, dirp); +} + +static int fake_perms_mkdir(struct connection_struct *conn, const char *path, mode_t mode) +{ + return default_vfs_ops.mkdir(conn, path, mode); +} + +static int fake_perms_rmdir(struct connection_struct *conn, const char *path) +{ + return default_vfs_ops.rmdir(conn, path); +} + +static int fake_perms_closedir(struct connection_struct *conn, DIR *dir) +{ + return default_vfs_ops.closedir(conn, dir); +} + +static int fake_perms_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode) +{ + return default_vfs_ops.open(conn, fname, flags, mode); +} + +static int fake_perms_close(struct files_struct *fsp, int fd) +{ + return default_vfs_ops.close(fsp, fd); +} + +static ssize_t fake_perms_read(struct files_struct *fsp, int fd, void *data, size_t n) +{ + return default_vfs_ops.read(fsp, fd, data, n); +} + +static ssize_t fake_perms_write(struct files_struct *fsp, int fd, const void *data, size_t n) +{ + return default_vfs_ops.write(fsp, fd, data, n); +} + +static SMB_OFF_T fake_perms_lseek(struct files_struct *fsp, int filedes, SMB_OFF_T offset, int whence) +{ + return default_vfs_ops.lseek(fsp, filedes, offset, whence); +} + +static int fake_perms_rename(struct connection_struct *conn, const char *old, const char *new) +{ + return default_vfs_ops.rename(conn, old, new); +} + +static int fake_perms_fsync(struct files_struct *fsp, int fd) +{ + return default_vfs_ops.fsync(fsp, fd); +} + +static int fake_perms_stat(struct connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf) +{ + int ret = default_vfs_ops.stat(conn, fname, sbuf); + extern struct current_user current_user; + + if (S_ISDIR(sbuf->st_mode)) { + sbuf->st_mode = S_IFDIR | S_IRWXU; + } else { + sbuf->st_mode = S_IRWXU; + } + sbuf->st_uid = current_user.uid; + sbuf->st_gid = current_user.gid; + return ret; +} + +static int fake_perms_fstat(struct files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf) +{ + return default_vfs_ops.fstat(fsp, fd, sbuf); +} + +static int fake_perms_lstat(struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf) +{ + return default_vfs_ops.lstat(conn, path, sbuf); +} + +static int fake_perms_unlink(struct connection_struct *conn, const char *path) +{ + return default_vfs_ops.unlink(conn, path); +} + +static int fake_perms_chmod(struct connection_struct *conn, const char *path, mode_t mode) +{ + return default_vfs_ops.chmod(conn, path, mode); +} + +static int fake_perms_fchmod(struct files_struct *fsp, int fd, mode_t mode) +{ + return default_vfs_ops.fchmod(fsp, fd, mode); +} + +static int fake_perms_chown(struct connection_struct *conn, const char *path, uid_t uid, gid_t gid) +{ + return default_vfs_ops.chown(conn, path, uid, gid); +} + +static int fake_perms_fchown(struct files_struct *fsp, int fd, uid_t uid, gid_t gid) +{ + return default_vfs_ops.fchown(fsp, fd, uid, gid); +} + +static int fake_perms_chdir(struct connection_struct *conn, const char *path) +{ + return default_vfs_ops.chdir(conn, path); +} + +static char *fake_perms_getwd(struct connection_struct *conn, char *buf) +{ + return default_vfs_ops.getwd(conn, buf); +} + +static int fake_perms_utime(struct connection_struct *conn, const char *path, struct utimbuf *times) +{ + return default_vfs_ops.utime(conn, path, times); +} + +static int fake_perms_ftruncate(struct files_struct *fsp, int fd, SMB_OFF_T offset) +{ + return default_vfs_ops.ftruncate(fsp, fd, offset); +} + +static BOOL fake_perms_lock(struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) +{ + return default_vfs_ops.lock(fsp, fd, op, offset, count, type); +} + +static BOOL fake_perms_symlink(struct connection_struct *conn, const char *oldpath, const char *newpath) +{ + return default_vfs_ops.symlink(conn, oldpath, newpath); +} + +static BOOL fake_perms_readlink(struct connection_struct *conn, const char *path, char *buf, size_t bufsiz) +{ + return default_vfs_ops.readlink(conn, path, buf, bufsiz); +} + +static int fake_perms_link(struct connection_struct *conn, const char *oldpath, const char *newpath) +{ + return default_vfs_ops.link(conn, oldpath, newpath); +} + +static int fake_perms_mknod(struct connection_struct *conn, const char *path, mode_t mode, SMB_DEV_T dev) +{ + return default_vfs_ops.mknod(conn, path, mode, dev); +} + +static char *fake_perms_realpath(struct connection_struct *conn, const char *path, char *resolved_path) +{ + return default_vfs_ops.realpath(conn, path, resolved_path); +} + +static size_t fake_perms_fget_nt_acl(struct files_struct *fsp, int fd, struct security_descriptor_info **ppdesc) +{ + return default_vfs_ops.fget_nt_acl(fsp, fd, ppdesc); +} + +static size_t fake_perms_get_nt_acl(struct files_struct *fsp, const char *name, struct security_descriptor_info **ppdesc) +{ + return default_vfs_ops.get_nt_acl(fsp, name, ppdesc); +} + +static BOOL fake_perms_fset_nt_acl(struct files_struct *fsp, int fd, uint32 security_info_sent, struct security_descriptor_info *psd) +{ + return default_vfs_ops.fset_nt_acl(fsp, fd, security_info_sent, psd); +} + +static BOOL fake_perms_set_nt_acl(struct files_struct *fsp, const char *name, uint32 security_info_sent, struct security_descriptor_info *psd) +{ + return default_vfs_ops.set_nt_acl(fsp, name, security_info_sent, psd); +} + +static BOOL fake_perms_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode) +{ + return default_vfs_ops.chmod_acl(conn, name, mode); +} + +static BOOL fake_perms_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode) +{ + return default_vfs_ops.fchmod_acl(fsp, fd, mode); +} + +static int fake_perms_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p) +{ + return default_vfs_ops.sys_acl_get_entry(conn, theacl, entry_id, entry_p); +} + +static int fake_perms_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p) +{ + return default_vfs_ops.sys_acl_get_tag_type(conn, entry_d, tag_type_p); +} + +static int fake_perms_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p) +{ + return default_vfs_ops.sys_acl_get_permset(conn, entry_d, permset_p); +} + +static void *fake_perms_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d) +{ + return default_vfs_ops.sys_acl_get_qualifier(conn, entry_d); +} + +static SMB_ACL_T fake_perms_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type) +{ + return default_vfs_ops.sys_acl_get_file(conn, path_p, type); +} + +static SMB_ACL_T fake_perms_sys_acl_get_fd(struct files_struct *fsp, int fd) +{ + return default_vfs_ops.sys_acl_get_fd(fsp, fd); +} + +static int fake_perms_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset) +{ + return default_vfs_ops.sys_acl_clear_perms(conn, permset); +} + +static int fake_perms_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return default_vfs_ops.sys_acl_add_perm(conn, permset, perm); +} + +static char *fake_perms_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen) +{ + return default_vfs_ops.sys_acl_to_text(conn, theacl, plen); +} + +static SMB_ACL_T fake_perms_sys_acl_init(struct connection_struct *conn, int count) +{ + return default_vfs_ops.sys_acl_init(conn, count); +} + +static int fake_perms_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry) +{ + return default_vfs_ops.sys_acl_create_entry(conn, pacl, pentry); +} + +static int fake_perms_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype) +{ + return default_vfs_ops.sys_acl_set_tag_type(conn, entry, tagtype); +} + +static int fake_perms_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual) +{ + return default_vfs_ops.sys_acl_set_qualifier(conn, entry, qual); +} + +static int fake_perms_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset) +{ + return default_vfs_ops.sys_acl_set_permset(conn, entry, permset); +} + +static int fake_perms_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl ) +{ + return default_vfs_ops.sys_acl_valid(conn, theacl ); +} + +static int fake_perms_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) +{ + return default_vfs_ops.sys_acl_set_file(conn, name, acltype, theacl); +} + +static int fake_perms_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl) +{ + return default_vfs_ops.sys_acl_set_fd(fsp, fd, theacl); +} + +static int fake_perms_sys_acl_delete_def_file(struct connection_struct *conn, const char *path) +{ + return default_vfs_ops.sys_acl_delete_def_file(conn, path); +} + +static int fake_perms_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return default_vfs_ops.sys_acl_get_perm(conn, permset, perm); +} + +static int fake_perms_sys_acl_free_text(struct connection_struct *conn, char *text) +{ + return default_vfs_ops.sys_acl_free_text(conn, text); +} + +static int fake_perms_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl) +{ + return default_vfs_ops.sys_acl_free_acl(conn, posix_acl); +} + +static int fake_perms_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype) +{ + return default_vfs_ops.sys_acl_free_qualifier(conn, qualifier, tagtype); +} + + +/* VFS operations structure */ + +static vfs_op_tuple fake_perms_ops[] = { + + /* Disk operations */ + + {fake_perms_connect, SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_disconnect, SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_disk_free, SMB_VFS_OP_DISK_FREE, SMB_VFS_LAYER_TRANSPARENT}, + + /* Directory operations */ + + {fake_perms_opendir, SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_readdir, SMB_VFS_OP_READDIR, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_mkdir, SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_rmdir, SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_closedir, SMB_VFS_OP_CLOSEDIR, SMB_VFS_LAYER_TRANSPARENT}, + + /* File operations */ + + {fake_perms_open, SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_close, SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_read, SMB_VFS_OP_READ, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_write, SMB_VFS_OP_WRITE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_lseek, SMB_VFS_OP_LSEEK, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_rename, SMB_VFS_OP_RENAME, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_fsync, SMB_VFS_OP_FSYNC, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_stat, SMB_VFS_OP_STAT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_fstat, SMB_VFS_OP_FSTAT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_lstat, SMB_VFS_OP_LSTAT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_unlink, SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_chmod, SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_fchmod, SMB_VFS_OP_FCHMOD, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_chown, SMB_VFS_OP_CHOWN, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_fchown, SMB_VFS_OP_FCHOWN, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_chdir, SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_getwd, SMB_VFS_OP_GETWD, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_utime, SMB_VFS_OP_UTIME, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_ftruncate, SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_lock, SMB_VFS_OP_LOCK, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_symlink, SMB_VFS_OP_SYMLINK, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_readlink, SMB_VFS_OP_READLINK, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_link, SMB_VFS_OP_LINK, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_mknod, SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_realpath, SMB_VFS_OP_REALPATH, SMB_VFS_LAYER_TRANSPARENT}, + + /* NT File ACL operations */ + + {fake_perms_fget_nt_acl, SMB_VFS_OP_FGET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_get_nt_acl, SMB_VFS_OP_GET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_fset_nt_acl, SMB_VFS_OP_FSET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_set_nt_acl, SMB_VFS_OP_SET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + + /* POSIX ACL operations */ + + {fake_perms_chmod_acl, SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_fchmod_acl, SMB_VFS_OP_FCHMOD_ACL, SMB_VFS_LAYER_TRANSPARENT}, + + {fake_perms_sys_acl_get_entry, SMB_VFS_OP_SYS_ACL_GET_ENTRY, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_get_tag_type, SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_get_permset, SMB_VFS_OP_SYS_ACL_GET_PERMSET, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_get_qualifier, SMB_VFS_OP_SYS_ACL_GET_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_get_file, SMB_VFS_OP_SYS_ACL_GET_FILE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_get_fd, SMB_VFS_OP_SYS_ACL_GET_FD, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_clear_perms, SMB_VFS_OP_SYS_ACL_CLEAR_PERMS, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_add_perm, SMB_VFS_OP_SYS_ACL_ADD_PERM, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_to_text, SMB_VFS_OP_SYS_ACL_TO_TEXT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_init, SMB_VFS_OP_SYS_ACL_INIT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_create_entry, SMB_VFS_OP_SYS_ACL_CREATE_ENTRY, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_set_tag_type, SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_set_qualifier, SMB_VFS_OP_SYS_ACL_SET_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_set_permset, SMB_VFS_OP_SYS_ACL_SET_PERMSET, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_valid, SMB_VFS_OP_SYS_ACL_VALID, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_set_file, SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_set_fd, SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_delete_def_file, SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_get_perm, SMB_VFS_OP_SYS_ACL_GET_PERM, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_free_text, SMB_VFS_OP_SYS_ACL_FREE_TEXT, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_free_acl, SMB_VFS_OP_SYS_ACL_FREE_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {fake_perms_sys_acl_free_qualifier, SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT}, + + {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} +}; + +/* VFS initialisation - return initialized vfs_op_tuple array back to Samba */ + +vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, + struct smb_vfs_handle_struct *vfs_handle) +{ + DEBUG(3, ("Initialising default vfs hooks\n")); + + *vfs_version = SMB_VFS_INTERFACE_VERSION; + memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + /* Remember vfs_handle for further allocation and referencing of private + information in vfs_handle->data + */ + fake_perms_handle = vfs_handle; + return fake_perms_ops; +} + +/* VFS finalization function */ +void vfs_done(connection_struct *conn) +{ + DEBUG(3, ("Finalizing default vfs hooks\n")); +} -- cgit From b68e6c99103fd0f1e8a25b2fafe14d7540b2ab10 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Mon, 30 Dec 2002 04:25:30 +0000 Subject: Port the fix to cli_setup_write to handle offsets greater than 32-bits from Samba 2.2.x ... (This used to be commit 4201038588bab8674b73371a5eac70a412c5dd6c) --- source3/libsmb/clireadwrite.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 7780c93cc4..187a40cade 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -252,6 +252,7 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 size_t size, int i) { char *p; + BOOL bigoffset = False; if (size > cli->bufsize) { cli->outbuf = realloc(cli->outbuf, size + 1024); @@ -264,7 +265,10 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 memset(cli->outbuf,'\0',smb_size); memset(cli->inbuf,'\0',smb_size); - if (size > 0xFFFF) + if ((SMB_BIG_UINT)offset >> 32) + bigoffset = True; + + if (bigoffset) set_message(cli->outbuf,14,0,True); else set_message(cli->outbuf,12,0,True); @@ -277,14 +281,20 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 SSVAL(cli->outbuf,smb_vwv2,fnum); SIVAL(cli->outbuf,smb_vwv3,offset); - SIVAL(cli->outbuf,smb_vwv5,(mode & 0x0008) ? 0xFFFFFFFF : 0); + SIVAL(cli->outbuf,smb_vwv5,0); SSVAL(cli->outbuf,smb_vwv7,mode); + /* + * THe following is still wrong ... + */ SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0); SSVAL(cli->outbuf,smb_vwv9,((size>>16)&1)); SSVAL(cli->outbuf,smb_vwv10,size); SSVAL(cli->outbuf,smb_vwv11, smb_buf(cli->outbuf) - smb_base(cli->outbuf)); + + if (bigoffset) + SIVAL(cli->outbuf,smb_vwv12,(offset>>32) & 0xffffffff); p = smb_base(cli->outbuf) + SVAL(cli->outbuf,smb_vwv11); memcpy(p, buf, size); -- cgit From 60667264b71d624ec45f567170b85589992567ed Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 30 Dec 2002 04:41:27 +0000 Subject: the shutdown call does not have a 16 bit flags, but 2 byte representing booleans this commit change the structure and code to reflect this some test revelead I'm right. some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation (This used to be commit c5892b656dedd0367adc33d9606311d1dde99a58) --- source3/include/rpc_reg.h | 7 ++----- source3/rpc_client/cli_reg.c | 5 +++-- source3/rpc_parse/parse_reg.c | 12 ++++++++---- source3/rpc_server/srv_reg_nt.c | 4 ++-- source3/rpcclient/cmd_reg.c | 35 ++++++++++++++++------------------- 5 files changed, 31 insertions(+), 32 deletions(-) (limited to 'source3') diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 92175cf287..33134e8834 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -85,10 +85,6 @@ #define REG_FULL_RESOURCE_DESCRIPTOR 9 #define REG_RESOURCE_REQUIREMENTS_LIST 10 -/* Shutdown options */ -#define REG_FORCE_SHUTDOWN 0x001 -#define REG_REBOOT_ON_SHUTDOWN 0x100 - /* structure to contain registry values */ typedef struct { @@ -616,7 +612,8 @@ typedef struct q_reg_shutdown_info UNIHDR hdr_msg; /* shutdown message */ UNISTR2 uni_msg; /* seconds */ uint32 timeout; /* seconds */ - uint16 flags; + uint8 force; /* boolean: force shutdown */ + uint8 reboot; /* boolean: reboot on shutdown */ } REG_Q_SHUTDOWN; diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index aaf18882f7..1e83295414 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -28,7 +28,8 @@ /* Shutdown a server */ NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, - const char *msg, uint32 timeout, uint16 flags) + const char *msg, uint32 timeout, BOOL reboot, + BOOL force) { prs_struct qbuf; prs_struct rbuf; @@ -46,7 +47,7 @@ NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ - init_reg_q_shutdown(&q_s, msg, timeout, flags); + init_reg_q_shutdown(&q_s, msg, timeout, reboot, force); if (!reg_io_q_shutdown("", &q_s, &qbuf, 0) || !rpc_api_pipe_req(cli, REG_SHUTDOWN, &qbuf, &rbuf)) diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 2698e82440..7bb8a6e2b4 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1736,8 +1736,8 @@ BOOL reg_io_r_open_entry(char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int /******************************************************************* Inits a structure. ********************************************************************/ -void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, - const char *msg, uint32 timeout, uint16 flags) +void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, const char *msg, + uint32 timeout, BOOL reboot, BOOL force) { int msg_len; msg_len = strlen(msg); @@ -1750,7 +1750,9 @@ void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, init_unistr2(&(q_s->uni_msg), msg, msg_len); q_s->timeout = timeout; - q_s->flags = flags; + + q_s->reboot = reboot ? 1 : 0; + q_s->force = force ? 1 : 0; } @@ -1785,7 +1787,9 @@ BOOL reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, if (!prs_uint32("timeout", ps, depth, &(q_s->timeout))) return False; - if (!prs_uint16("flags ", ps, depth, &(q_s->flags))) + if (!prs_uint8("force ", ps, depth, &(q_s->force))) + return False; + if (!prs_uint8("reboot ", ps, depth, &(q_s->reboot))) return False; return True; diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 7435bdb6f7..215d468404 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -590,9 +590,9 @@ NTSTATUS _reg_shutdown(pipes_struct *p, REG_Q_SHUTDOWN *q_u, REG_R_SHUTDOWN *r_u /* timeout */ snprintf(timeout, sizeof(timeout), "%d", q_u->timeout); /* reboot */ - snprintf(r, sizeof(r), (q_u->flags & REG_REBOOT_ON_SHUTDOWN)?SHUTDOWN_R_STRING:""); + snprintf(r, sizeof(r), (q_u->reboot) ? SHUTDOWN_R_STRING : ""); /* force */ - snprintf(f, sizeof(f), (q_u->flags & REG_FORCE_SHUTDOWN)?SHUTDOWN_F_STRING:""); + snprintf(f, sizeof(f), (q_u->force) ? SHUTDOWN_F_STRING : ""); pstrcpy(shutdown_script, lp_shutdown_script()); diff --git a/source3/rpcclient/cmd_reg.c b/source3/rpcclient/cmd_reg.c index e0a3201aa9..5d29b4c51a 100644 --- a/source3/rpcclient/cmd_reg.c +++ b/source3/rpcclient/cmd_reg.c @@ -900,7 +900,8 @@ static NTSTATUS cmd_reg_shutdown(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS result = NT_STATUS_UNSUCCESSFUL; fstring msg; uint32 timeout = 20; - uint16 flgs = 0; + BOOL force = False; + BOOL reboot = False; int opt; *msg = 0; @@ -908,37 +909,33 @@ static NTSTATUS cmd_reg_shutdown(struct cli_state *cli, TALLOC_CTX *mem_ctx, while ((opt = getopt(argc, argv, "m:t:rf")) != EOF) { - fprintf (stderr, "[%s]\n", argv[argc-1]); + /*fprintf (stderr, "[%s]\n", argv[argc-1]);*/ switch (opt) { case 'm': - { safe_strcpy(msg, optarg, sizeof(msg)-1); - fprintf (stderr, "[%s|%s]\n", optarg, msg); + /*fprintf (stderr, "[%s|%s]\n", optarg, msg);*/ break; - } + case 't': - { timeout = atoi(optarg); - fprintf (stderr, "[%s|%d]\n", optarg, timeout); - break; - } + /*fprintf (stderr, "[%s|%d]\n", optarg, timeout);*/ + break; + case 'r': - { - flgs |= 0x100; - break; - } + reboot = True; + break; + case 'f': - { - flgs |= 0x001; + force = True; break; - } + } } /* create an entry */ - result = cli_reg_shutdown(cli, mem_ctx, msg, timeout, flgs); + result = cli_reg_shutdown(cli, mem_ctx, msg, timeout, reboot, force); if (NT_STATUS_IS_OK(result)) DEBUG(5,("cmd_reg_shutdown: query succeeded\n")); @@ -974,10 +971,10 @@ struct cmd_set reg_commands[] = { { "REG" }, { "shutdown", cmd_reg_shutdown, PI_WINREG, "Remote Shutdown", - "[-m message] [-t timeout] [-r] [-f] (-r == reboot, -f == force)" }, + "syntax: shutdown [-m message] [-t timeout] [-r] [-h] [-f] (-r == reboot, -h == halt, -f == force)" }, { "abortshutdown", cmd_reg_abort_shutdown, PI_WINREG, "Abort Shutdown", - "" }, + "syntax: abortshutdown" }, /* { "regenum", cmd_reg_enum, "Registry Enumeration", "" }, -- cgit From a2244a4ecad11f70478e682d5843a710a99f60f2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 30 Dec 2002 23:38:17 +0000 Subject: fix also net rpc shutdown sorry (This used to be commit 1eff36ff2fd20ff1844800acefb31972ad865527) --- source3/utils/net_rpc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 2b2a69eb99..27ea23d183 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1444,9 +1444,6 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta NTSTATUS result = NT_STATUS_UNSUCCESSFUL; char *msg = "This machine will be shutdown shortly"; uint32 timeout = 20; - uint16 flgs = 0; - BOOL reboot = opt_reboot; - BOOL force = opt_force; #if 0 poptContext pc; int rc; @@ -1472,12 +1469,6 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta return NT_STATUS_INVALID_PARAMETER; } #endif - if (reboot) { - flgs |= REG_REBOOT_ON_SHUTDOWN; - } - if (force) { - flgs |= REG_FORCE_SHUTDOWN; - } if (opt_comment) { msg = opt_comment; } @@ -1486,7 +1477,7 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta } /* create an entry */ - result = cli_reg_shutdown(cli, mem_ctx, msg, timeout, flgs); + result = cli_reg_shutdown(cli, mem_ctx, msg, timeout, opt_reboot, opt_force); if (NT_STATUS_IS_OK(result)) DEBUG(5,("Shutdown of remote machine succeeded\n")); -- cgit From 944fb243eb9d28761870f0c86325aaf9665041eb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Dec 2002 23:55:58 +0000 Subject: Catching up with old patches. Add define for VERITAS quota support. Check return in ldap. Jeremy. (This used to be commit e789edbb287319f52f49f2999917a610565144d9) --- source3/include/includes.h | 8 ++++++++ source3/libads/ldap.c | 2 ++ 2 files changed, 10 insertions(+) (limited to 'source3') diff --git a/source3/include/includes.h b/source3/include/includes.h index a958fd416c..9047710557 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -1181,5 +1181,13 @@ time_t timegm(struct tm *tm); #define strlen(x) valgrind_strlen(x) #endif +/* + * Veritas File System. Often in addition to native. + * Quotas different. + */ +#if defined(HAVE_SYS_FS_VX_QUOTA_H) +#define VXFS_QUOTA +#endif + #endif /* _INCLUDES_H */ diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 97ccf76983..1ed1da0b5d 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -326,6 +326,8 @@ static struct berval *dup_berval(TALLOC_CTX *ctx, const struct berval *in_val) if (!in_val) return NULL; value = talloc_zero(ctx, sizeof(struct berval)); + if (value == NULL) + return NULL; if (in_val->bv_len == 0) return value; value->bv_len = in_val->bv_len; -- cgit From ed961ddf4474e55f410bbb1471cbeebff80e0011 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 31 Dec 2002 00:45:35 +0000 Subject: ignore tdbsam2_parse_info.h (This used to be commit 1a1c746c9fde965d2ad3f8fb9c1b0263754745e8) --- source3/include/.cvsignore | 1 + 1 file changed, 1 insertion(+) (limited to 'source3') diff --git a/source3/include/.cvsignore b/source3/include/.cvsignore index 60afd37315..a96c335c31 100644 --- a/source3/include/.cvsignore +++ b/source3/include/.cvsignore @@ -3,3 +3,4 @@ config.h stamp-h proto.h wrepld_proto.h +tdbsam2_parse_info.h -- cgit From 2eb7a80a46e1e2d7331a62d15c5754895285540f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 31 Dec 2002 10:23:37 +0000 Subject: fix for bad check spotted by Ray Simard (This used to be commit 63a669475b0ea319da12a87ee4635b1d071ff29f) --- source3/smbd/reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index de15faec81..4335728afc 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1888,7 +1888,7 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, DEBUG(3,("writebraw1 fnum=%d start=%.0f num=%d wrote=%d sync=%d\n", fsp->fnum, (double)startpos, (int)numtowrite, (int)nwritten, (int)write_through)); - if (nwritten < numtowrite) { + if (nwritten < (ssize_t)numtowrite) { END_PROFILE(SMBwritebraw); return(UNIXERROR(ERRHRD,ERRdiskfull)); } -- cgit From 60f9614400a073626344be6e0dedb8d15611cfff Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 1 Jan 2003 04:19:34 +0000 Subject: Move our password change code along a little - use NTSTATUS, and implmenet minimum password age and min password length for all password changes. Andrew Bartlett (This used to be commit 028f808c032becfa4618924cb301a4af2708fa96) --- source3/rpc_server/srv_samr_nt.c | 5 +- source3/smbd/chgpasswd.c | 112 +++++++++++++++++++++++++++++---------- source3/smbd/lanman.c | 22 +------- 3 files changed, 89 insertions(+), 50 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 3e3baedb9a..b4cd8ae5b5 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1536,9 +1536,8 @@ NTSTATUS _samr_chgpasswd_user(pipes_struct *p, SAMR_Q_CHGPASSWD_USER *q_u, SAMR_ * is case insensitive. */ - if (!pass_oem_change(user_name, q_u->lm_newpass.pass, q_u->lm_oldhash.hash, - q_u->nt_newpass.pass, q_u->nt_oldhash.hash)) - r_u->status = NT_STATUS_WRONG_PASSWORD; + r_u->status = pass_oem_change(user_name, q_u->lm_newpass.pass, q_u->lm_oldhash.hash, + q_u->nt_newpass.pass, q_u->nt_oldhash.hash); init_samr_r_chgpasswd_user(r_u, r_u->status); diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index c2a82d1eb6..80b412af49 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -2,6 +2,7 @@ Unix SMB/CIFS implementation. Samba utility functions Copyright (C) Andrew Tridgell 1992-1998 + Copyright (C) Andrew Bartlett 2001-2002 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 @@ -50,7 +51,7 @@ extern struct passdb_ops pdb_ops; -static BOOL check_oem_password(const char *user, +static NTSTATUS check_oem_password(const char *user, uchar * lmdata, const uchar * lmhash, const uchar * ntdata, const uchar * nthash, SAM_ACCOUNT **hnd, char *new_passwd, @@ -478,6 +479,10 @@ BOOL chgpasswd(const char *name, const char *oldpass, const char *newpass, BOOL DEBUG(1, ("NULL username specfied to chgpasswd()!\n")); } + if (!oldpass) { + oldpass = ""; + } + DEBUG(3, ("Password change for user: %s\n", name)); #if DEBUG_PASSWORD @@ -732,15 +737,19 @@ BOOL change_lanman_password(SAM_ACCOUNT *sampass, uchar * pass1, /*********************************************************** Code to check and change the OEM hashed password. ************************************************************/ -BOOL pass_oem_change(char *user, - uchar * lmdata, uchar * lmhash, - uchar * ntdata, uchar * nthash) +NTSTATUS pass_oem_change(char *user, + uchar * lmdata, uchar * lmhash, + uchar * ntdata, uchar * nthash) { fstring new_passwd; const char *unix_user; SAM_ACCOUNT *sampass = NULL; - BOOL ret = check_oem_password(user, lmdata, lmhash, ntdata, nthash, - &sampass, new_passwd, sizeof(new_passwd)); + NTSTATUS nt_status + = check_oem_password(user, lmdata, lmhash, ntdata, nthash, + &sampass, new_passwd, sizeof(new_passwd)); + + if (NT_STATUS_IS_OK(nt_status)) + return nt_status; /* * At this point we have the new case-sensitive plaintext @@ -753,17 +762,13 @@ BOOL pass_oem_change(char *user, unix_user = pdb_get_username(sampass); - if ((ret) && (unix_user) && (*unix_user) && lp_unix_password_sync()) - ret = chgpasswd(unix_user, "", new_passwd, True); - - if (ret) - ret = change_oem_password(sampass, new_passwd); + nt_status = change_oem_password(sampass, NULL, new_passwd); memset(new_passwd, 0, sizeof(new_passwd)); pdb_free_sam(&sampass); - return ret; + return nt_status; } /*********************************************************** @@ -773,7 +778,7 @@ BOOL pass_oem_change(char *user, but does use the lm OEM password to check the nt hashed-hash. ************************************************************/ -static BOOL check_oem_password(const char *user, +static NTSTATUS check_oem_password(const char *user, uchar * lmdata, const uchar * lmhash, const uchar * ntdata, const uchar * nthash, SAM_ACCOUNT **hnd, char *new_passwd, @@ -802,7 +807,11 @@ static BOOL check_oem_password(const char *user, if (ret == False) { DEBUG(0, ("check_oem_password: getsmbpwnam returned NULL\n")); - return False; + return NT_STATUS_WRONG_PASSWORD; + /* + TODO: check what Win2k returns for this: + return NT_STATUS_NO_SUCH_USER; + */ } *hnd = sampass; @@ -811,7 +820,7 @@ static BOOL check_oem_password(const char *user, if (acct_ctrl & ACB_DISABLED) { DEBUG(0,("check_lanman_password: account %s disabled.\n", user)); - return False; + return NT_STATUS_ACCOUNT_DISABLED; } /* construct a null password (in case one is needed */ @@ -827,14 +836,14 @@ static BOOL check_oem_password(const char *user, if (lanman_pw == NULL) { if (!(acct_ctrl & ACB_PWNOTREQ)) { DEBUG(0,("check_oem_password: no lanman password !\n")); - return False; + return NT_STATUS_WRONG_PASSWORD; } } if (pdb_get_nt_passwd(sampass) == NULL && nt_pass_set) { if (!(acct_ctrl & ACB_PWNOTREQ)) { DEBUG(0,("check_oem_password: no ntlm password !\n")); - return False; + return NT_STATUS_WRONG_PASSWORD; } } @@ -851,7 +860,7 @@ static BOOL check_oem_password(const char *user, new_pw_len = IVAL(lmdata, 512); if (new_pw_len < 0 || new_pw_len > new_passwd_size - 1) { DEBUG(0,("check_oem_password: incorrect password length (%d).\n", new_pw_len)); - return False; + return NT_STATUS_WRONG_PASSWORD; } if (nt_pass_set) { @@ -884,14 +893,14 @@ static BOOL check_oem_password(const char *user, if (memcmp(lanman_pw, unenc_old_pw, 16)) { DEBUG(0,("check_oem_password: old lm password doesn't match.\n")); - return False; + return NT_STATUS_WRONG_PASSWORD; } #ifdef DEBUG_PASSWORD DEBUG(100, ("check_oem_password: password %s ok\n", new_passwd)); #endif - return True; + return NT_STATUS_OK; } /* @@ -904,31 +913,76 @@ static BOOL check_oem_password(const char *user, if (memcmp(lanman_pw, unenc_old_pw, 16)) { DEBUG(0,("check_oem_password: old lm password doesn't match.\n")); - return False; + return NT_STATUS_WRONG_PASSWORD; } if (memcmp(nt_pw, unenc_old_ntpw, 16)) { DEBUG(0,("check_oem_password: old nt password doesn't match.\n")); - return False; + return NT_STATUS_WRONG_PASSWORD; } #ifdef DEBUG_PASSWORD DEBUG(100, ("check_oem_password: password %s ok\n", new_passwd)); #endif - return True; + return NT_STATUS_OK; } /*********************************************************** Code to change the oem password. Changes both the lanman - and NT hashes. + and NT hashes. Old_passwd is almost always NULL. ************************************************************/ -BOOL change_oem_password(SAM_ACCOUNT *hnd, char *new_passwd) +NTSTATUS change_oem_password(SAM_ACCOUNT *hnd, char *old_passwd, char *new_passwd) { BOOL ret; + uint32 min_len; + + if (time(NULL) < pdb_get_pass_can_change_time(hnd)) { + DEBUG(1, ("user %s cannot change password now, must wait until %s\n", + pdb_get_username(hnd), http_timestring(pdb_get_pass_can_change_time(hnd)))); + return NT_STATUS_PASSWORD_RESTRICTION; + } + + if (account_policy_get(AP_MIN_PASSWORD_LEN, &min_len) && (strlen(new_passwd) < min_len)) { + DEBUG(1, ("user %s cannot change password - password too short\n", + pdb_get_username(hnd))); + DEBUGADD(1, (" account policy min password len = %d\n", min_len)); + return NT_STATUS_PASSWORD_RESTRICTION; +/* return NT_STATUS_PWD_TOO_SHORT; */ + } + + /* Take the passed information and test it for minimum criteria */ + /* Minimum password length */ + if (strlen(new_passwd) < lp_min_passwd_length()) { + /* too short, must be at least MINPASSWDLENGTH */ + DEBUG(1, ("Password Change: user %s, New password is shorter than minimum password length = %d\n", + pdb_get_username(hnd), lp_min_passwd_length())); + return NT_STATUS_PASSWORD_RESTRICTION; +/* return NT_STATUS_PWD_TOO_SHORT; */ + } + + /* TODO: Add cracklib support here */ + + /* + * If unix password sync was requested, attempt to change + * the /etc/passwd database first. Return failure if this cannot + * be done. + * + * This occurs before the oem change, becouse we don't want to + * update it if chgpasswd failed. + * + * Conditional on lp_unix_password_sync() becouse we don't want + * to touch the unix db unless we have admin permission. + */ + + if(lp_unix_password_sync() && IS_SAM_UNIX_USER(hnd) + && !chgpasswd(pdb_get_username(hnd), + old_passwd, new_passwd, False)) { + return NT_STATUS_ACCESS_DENIED; + } if (!pdb_set_plaintext_passwd (hnd, new_passwd)) { - return False; + return NT_STATUS_ACCESS_DENIED; } /* Now write it into the file. */ @@ -936,7 +990,11 @@ BOOL change_oem_password(SAM_ACCOUNT *hnd, char *new_passwd) ret = pdb_update_sam_account (hnd); unbecome_root(); - return ret; + if (!ret) { + return NT_STATUS_ACCESS_DENIED; + } + + return NT_STATUS_OK; } diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 43b5d9e55f..f174db5aa6 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -1930,25 +1930,7 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid, char *param DATA_BLOB password = data_blob(pass1, strlen(pass1)+1); if (NT_STATUS_IS_OK(check_plaintext_password(user,password,&server_info))) { - /* - * If unix password sync was requested, attempt to change - * the /etc/passwd database first. Return failure if this cannot - * be done. - * - * This occurs before the oem change, becouse we don't want to - * update it if chgpasswd failed. - * - * Conditional on lp_unix_password_sync() becouse we don't want - * to touch the unix db unless we have admin permission. - */ - - if(lp_unix_password_sync() && IS_SAM_UNIX_USER(server_info->sam_account) - && !chgpasswd(pdb_get_username(server_info->sam_account), - pass1,pass2,False)) { - SSVAL(*rparam,0,NERR_badpass); - } - - if (change_oem_password(server_info->sam_account,pass2)) + if (NT_STATUS_IS_OK(change_oem_password(server_info->sam_account, pass1, pass2))) { SSVAL(*rparam,0,NERR_Success); } @@ -2031,7 +2013,7 @@ static BOOL api_SamOEMChangePassword(connection_struct *conn,uint16 vuid, char * (void)map_username(user); - if (pass_oem_change(user, (uchar*) data, (uchar *)&data[516], NULL, NULL)) + if (NT_STATUS_IS_OK(pass_oem_change(user, (uchar*) data, (uchar *)&data[516], NULL, NULL))) { SSVAL(*rparam,0,NERR_Success); } -- cgit From c105c12d122e599fe57dde8b2b73c52231f0c1d2 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Wed, 1 Jan 2003 21:54:00 +0000 Subject: Document the size constraints on a write request. (This used to be commit 5d6c1810330b38e48355078b7a5d53e7b5076f74) --- source3/libsmb/clireadwrite.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 187a40cade..d35b0dfdfd 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -284,10 +284,13 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 SIVAL(cli->outbuf,smb_vwv5,0); SSVAL(cli->outbuf,smb_vwv7,mode); + SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0); /* - * THe following is still wrong ... + * According to CIFS-TR-1p00, this following field should only + * be set if CAP_LARGE_WRITEX is set. We should check this + * locally. However, this check might already have been + * done by our callers. */ - SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0); SSVAL(cli->outbuf,smb_vwv9,((size>>16)&1)); SSVAL(cli->outbuf,smb_vwv10,size); SSVAL(cli->outbuf,smb_vwv11, -- cgit From 6d66fb308ab85bd9691d541764e683e6040cf724 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 2 Jan 2003 09:07:17 +0000 Subject: BIG patch... This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d) --- source3/auth/auth.c | 4 +- source3/auth/pampass.c | 4 +- source3/client/client.c | 4 +- source3/client/clitar.c | 12 +- source3/client/smbspool.c | 4 +- source3/groupdb/mapping.c | 6 +- source3/include/auth.h | 6 +- source3/include/charset.h | 2 +- source3/include/includes.h | 2 +- source3/include/mapping.h | 4 +- source3/include/ntdomain.h | 4 +- source3/include/passdb.h | 2 +- source3/include/rpc_dce.h | 4 +- source3/include/rpc_reg.h | 2 +- source3/include/smb.h | 34 ++-- source3/intl/lang_tdb.c | 6 +- source3/lib/account_pol.c | 4 +- source3/lib/adt_tree.c | 2 +- source3/lib/charcnv.c | 12 +- source3/lib/genrand.c | 2 +- source3/lib/iconv.c | 12 +- source3/lib/messages.c | 2 +- source3/lib/pam_errors.c | 4 +- source3/lib/pidfile.c | 4 +- source3/lib/smbpasswd.c | 2 +- source3/lib/system.c | 2 +- source3/lib/util.c | 8 +- source3/lib/util_sid.c | 7 +- source3/lib/util_sock.c | 2 +- source3/lib/util_str.c | 4 +- source3/libads/disp_sec.c | 6 +- source3/libads/ldap.c | 4 +- source3/libads/ldap_printer.c | 6 +- source3/libsmb/asn1.c | 2 +- source3/libsmb/clidgram.c | 4 +- source3/libsmb/clientgen.c | 2 +- source3/libsmb/clierror.c | 6 +- source3/libsmb/clikrb5.c | 2 +- source3/libsmb/cliprint.c | 2 +- source3/libsmb/clirap.c | 6 +- source3/libsmb/clirap2.c | 2 +- source3/libsmb/clireadwrite.c | 5 +- source3/libsmb/doserr.c | 4 +- source3/libsmb/errormap.c | 6 +- source3/libsmb/nmblib.c | 8 +- source3/libsmb/nterr.c | 8 +- source3/libsmb/smberr.c | 12 +- source3/libsmb/unexpected.c | 4 +- source3/nmbd/nmbd_namelistdb.c | 4 +- source3/nmbd/nmbd_packets.c | 4 +- source3/nmbd/nmbd_processlogon.c | 4 +- source3/nmbd/nmbd_sendannounce.c | 2 +- source3/nmbd/nmbd_subnetdb.c | 2 +- source3/nmbd/nmbd_winsserver.c | 5 +- source3/nsswitch/wbinfo.c | 2 +- source3/nsswitch/winbindd.c | 2 +- source3/param/loadparm.c | 106 ++++++------ source3/param/params.c | 24 +-- source3/passdb/passdb.c | 4 +- source3/passdb/pdb_interface.c | 6 +- source3/passdb/pdb_ldap.c | 2 +- source3/passdb/pdb_tdb.c | 2 +- source3/passdb/secrets.c | 2 +- source3/passdb/util_sam_sid.c | 16 +- source3/printing/lpq_parse.c | 8 +- source3/printing/nt_printing.c | 42 ++--- source3/printing/printing.c | 12 +- source3/registry/reg_objects.c | 4 +- source3/registry/reg_printing.c | 2 +- source3/rpc_client/cli_pipe.c | 2 +- source3/rpc_client/cli_spoolss.c | 16 +- source3/rpc_parse/parse_dfs.c | 24 +-- source3/rpc_parse/parse_ds.c | 6 +- source3/rpc_parse/parse_lsa.c | 126 +++++++------- source3/rpc_parse/parse_misc.c | 68 ++++---- source3/rpc_parse/parse_net.c | 92 +++++----- source3/rpc_parse/parse_prs.c | 44 ++--- source3/rpc_parse/parse_reg.c | 80 ++++----- source3/rpc_parse/parse_rpc.c | 44 ++--- source3/rpc_parse/parse_samr.c | 274 ++++++++++++++--------------- source3/rpc_parse/parse_sec.c | 10 +- source3/rpc_parse/parse_spoolss.c | 337 ++++++++++++++++++------------------ source3/rpc_parse/parse_srv.c | 212 +++++++++++------------ source3/rpc_parse/parse_wks.c | 6 +- source3/rpc_server/srv_lsa.c | 2 +- source3/rpc_server/srv_netlog_nt.c | 6 +- source3/rpc_server/srv_pipe.c | 6 +- source3/rpc_server/srv_reg_nt.c | 4 +- source3/rpc_server/srv_spoolss_nt.c | 30 ++-- source3/rpc_server/srv_srvsvc_nt.c | 4 +- source3/rpc_server/srv_util.c | 6 +- source3/rpcclient/cmd_samr.c | 2 +- source3/rpcclient/cmd_spoolss.c | 12 +- source3/rpcclient/rpcclient.h | 6 +- source3/smbd/build_options.c | 4 +- source3/smbd/connection.c | 6 +- source3/smbd/dir.c | 21 ++- source3/smbd/filename.c | 6 +- source3/smbd/lanman.c | 37 ++-- source3/smbd/mangle.c | 4 +- source3/smbd/mangle_hash.c | 8 +- source3/smbd/negprot.c | 6 +- source3/smbd/nttrans.c | 2 +- source3/smbd/process.c | 4 +- source3/smbd/reply.c | 2 +- source3/smbd/server.c | 9 +- source3/smbd/utmp.c | 2 +- source3/smbd/vfs.c | 2 +- source3/tdb/tdbutil.c | 42 ++--- source3/torture/denytest.c | 20 +-- source3/torture/locktest2.c | 2 +- source3/torture/masktest.c | 16 +- source3/torture/nsstest.c | 4 +- source3/torture/scanner.c | 16 +- source3/torture/torture.c | 62 +++---- source3/torture/vfstest.c | 4 +- source3/torture/vfstest.h | 6 +- source3/ubiqx/debugparse.c | 2 +- source3/ubiqx/debugparse.h | 2 +- source3/utils/editreg.c | 20 +-- source3/utils/net.c | 16 +- source3/utils/net.h | 16 +- source3/utils/net_ads.c | 20 ++- source3/utils/net_rap.c | 6 +- source3/utils/net_rpc.c | 23 +-- source3/utils/net_time.c | 6 - source3/utils/nmblookup.c | 4 +- source3/utils/ntlm_auth.c | 2 +- source3/utils/pdbedit.c | 28 +-- source3/utils/profiles.c | 2 +- source3/utils/smbcacls.c | 14 +- source3/utils/smbcontrol.c | 6 +- source3/utils/smbpasswd.c | 4 +- source3/utils/testprns.c | 2 +- source3/web/cgi.c | 18 +- source3/web/statuspage.c | 2 +- source3/web/swat.c | 30 ++-- source3/wrepld/server.c | 2 +- 138 files changed, 1225 insertions(+), 1215 deletions(-) (limited to 'source3') diff --git a/source3/auth/auth.c b/source3/auth/auth.c index dce14ed468..3c4448445a 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -25,7 +25,7 @@ /** List of various built-in authentication modules */ -const struct auth_init_function_entry builtin_auth_init_functions[] = { +static const struct auth_init_function_entry builtin_auth_init_functions[] = { { "guest", auth_init_guest }, { "rhosts", auth_init_rhosts }, { "hostsequiv", auth_init_hostsequiv }, @@ -52,7 +52,7 @@ const struct auth_init_function_entry builtin_auth_init_functions[] = { static const uint8 *get_ntlm_challenge(struct auth_context *auth_context) { DATA_BLOB challenge = data_blob(NULL, 0); - char *challenge_set_by = NULL; + const char *challenge_set_by = NULL; auth_methods *auth_method; TALLOC_CTX *mem_ctx; diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c index 1a3e55dd44..045ceb7c72 100644 --- a/source3/auth/pampass.c +++ b/source3/auth/pampass.c @@ -65,7 +65,7 @@ typedef int (*smb_pam_conv_fn)(int, const struct pam_message **, struct pam_resp PAM error handler. *********************************************************************/ -static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, char *msg, int dbglvl) +static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, const char *msg, int dbglvl) { if( pam_error != PAM_SUCCESS) { @@ -83,7 +83,7 @@ static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, char *msg, *********************************************************************/ static BOOL smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error, - char *msg, int dbglvl, + const char *msg, int dbglvl, NTSTATUS *nt_status) { *nt_status = pam_to_nt_status(pam_error); diff --git a/source3/client/client.c b/source3/client/client.c index 76e07cb4f3..feb9e07d16 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2057,9 +2057,9 @@ static BOOL list_servers(char *wk_grp) */ static struct { - char *name; + const char *name; int (*fn)(void); - char *description; + const char *description; char compl_args[2]; /* Completion argument info */ } commands[] = { diff --git a/source3/client/clitar.c b/source3/client/clitar.c index bf4b6e592a..e8be5e04e7 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -121,12 +121,12 @@ extern int get_total_size; static int blocksize=20; static int tarhandle; -static void writetarheader(int f, char *aname, SMB_BIG_UINT size, time_t mtime, - char *amode, unsigned char ftype); +static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime, + const char *amode, unsigned char ftype); static void do_atar(char *rname,char *lname,file_info *finfo1); static void do_tar(file_info *finfo); static void oct_it(SMB_BIG_UINT value, int ndgs, char *p); -static void fixtarname(char *tptr, char *fp, int l); +static void fixtarname(char *tptr, const char *fp, int l); static int dotarbuf(int f, char *b, int n); static void dozerobuf(int f, int n); static void dotareof(int f); @@ -164,8 +164,8 @@ static char *string_create_s(int size) /**************************************************************************** Write a tar header to buffer ****************************************************************************/ -static void writetarheader(int f, char *aname, SMB_BIG_UINT size, time_t mtime, - char *amode, unsigned char ftype) +static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime, + const char *amode, unsigned char ftype) { union hblock hb; int i, chk, l; @@ -414,7 +414,7 @@ static void dotareof(int f) /**************************************************************************** (Un)mangle DOS pathname, make nonabsolute ****************************************************************************/ -static void fixtarname(char *tptr, char *fp, int l) +static void fixtarname(char *tptr, const char *fp, int l) { /* add a '.' to start of file name, convert from ugly dos \'s in path * to lovely unix /'s :-} */ diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 4c90db4114..c42cc7b91f 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -52,8 +52,8 @@ static int smb_print(struct cli_state *, char *, FILE *); int copies; /* Number of copies */ char uri[1024], /* URI */ *sep, /* Pointer to separator */ - *username, /* Username */ - *password, /* Password */ + *password; /* Password */ + const char *username, /* Username */ *server, /* Server name */ *printer; /* Printer name */ const char *workgroup; /* Workgroup */ diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 943183c061..3809abc37a 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -209,7 +209,7 @@ static BOOL default_group_mapping(void) static BOOL init_group_mapping(void) { static pid_t local_pid; - char *vstring = "INFO/version"; + const char *vstring = "INFO/version"; int32 vers_id; if (tdb && local_pid == sys_getpid()) @@ -293,8 +293,8 @@ BOOL add_mapping_entry(GROUP_MAP *map, int flag) /**************************************************************************** initialise first time the mapping list ****************************************************************************/ -BOOL add_initial_entry(gid_t gid, fstring sid, enum SID_NAME_USE sid_name_use, - fstring nt_name, fstring comment, PRIVILEGE_SET priv_set, uint32 systemaccount) +BOOL add_initial_entry(gid_t gid, const char *sid, enum SID_NAME_USE sid_name_use, + const char *nt_name, const char *comment, PRIVILEGE_SET priv_set, uint32 systemaccount) { GROUP_MAP map; diff --git a/source3/include/auth.h b/source3/include/auth.h index 66b317d643..846662d17c 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -100,7 +100,7 @@ struct auth_context { DATA_BLOB challenge; /* Who set this up in the first place? */ - char *challenge_set_by; + const char *challenge_set_by; struct auth_methods *challenge_set_method; /* What order are the various methods in? Try to stop it changing under us */ @@ -118,7 +118,7 @@ struct auth_context { typedef struct auth_methods { struct auth_methods *prev, *next; - char *name; /* What name got this module */ + const char *name; /* What name got this module */ NTSTATUS (*auth)(const struct auth_context *auth_context, void *my_private_data, @@ -144,7 +144,7 @@ typedef struct auth_methods typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *, struct auth_methods **); struct auth_init_function_entry { - char *name; + const char *name; /* Function to create a member of the authmethods list */ auth_init_function init; diff --git a/source3/include/charset.h b/source3/include/charset.h index d04f63abd1..c56984ca7b 100644 --- a/source3/include/charset.h +++ b/source3/include/charset.h @@ -30,7 +30,7 @@ typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t * */ struct charset_functions { - char *name; + const char *name; size_t (*pull)(void *, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); size_t (*push)(void *, char **inbuf, size_t *inbytesleft, diff --git a/source3/include/includes.h b/source3/include/includes.h index 9047710557..9b19904962 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -797,7 +797,7 @@ typedef struct smb_wpasswd { /* used in net.c */ struct functable { - char *funcname; + const char *funcname; int (*fn)(int argc, const char **argv); }; diff --git a/source3/include/mapping.h b/source3/include/mapping.h index d2fb89d1de..d4f2d28e6a 100644 --- a/source3/include/mapping.h +++ b/source3/include/mapping.h @@ -55,7 +55,7 @@ typedef struct _GROUP_MAP { typedef struct _PRIVS { uint32 se_priv; - char *priv; - char *description; + const char *priv; + const char *description; } PRIVS; diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 628035885e..cf5bb5046c 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -331,7 +331,7 @@ typedef struct smb_np_struct struct api_struct { - char *name; + const char *name; uint8 opnum; BOOL (*fn) (pipes_struct *); }; @@ -339,7 +339,7 @@ struct api_struct typedef struct { uint32 rid; - char *name; + const char *name; } rid_name; diff --git a/source3/include/passdb.h b/source3/include/passdb.h index f1e15f614a..06409aa34e 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -146,7 +146,7 @@ typedef NTSTATUS (*pdb_init_function)(struct pdb_context *, const char *); struct pdb_init_function_entry { - char *name; + const char *name; /* Function to create a member of the pdb_methods list */ pdb_init_function init; struct pdb_init_function_entry *prev, *next; diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 3e615dab80..031f7de6d7 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -119,10 +119,10 @@ struct pipe_id_info { /* the names appear not to matter: the syntaxes _do_ matter */ - char *client_pipe; + const char *client_pipe; RPC_IFACE abstr_syntax; /* this one is the abstract syntax id */ - char *server_pipe; /* this one is the secondary syntax name */ + const char *server_pipe; /* this one is the secondary syntax name */ RPC_IFACE trans_syntax; /* this one is the primary syntax id */ }; diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 33134e8834..46ec88283d 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -125,7 +125,7 @@ typedef struct { } REGISTRY_OPS; typedef struct { - char *keyname; /* full path to name of key */ + const char *keyname; /* full path to name of key */ REGISTRY_OPS *ops; /* registry function hooks */ } REGISTRY_HOOK; diff --git a/source3/include/smb.h b/source3/include/smb.h index b389020e23..60ab6be29a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -651,19 +651,19 @@ typedef struct sam_passwd time_t pass_can_change_time; /* password can change time */ time_t pass_must_change_time; /* password must change time */ - char * username; /* UNIX username string */ - char * domain; /* Windows Domain name */ - char * nt_username; /* Windows username string */ - char * full_name; /* user's full name string */ - char * unix_home_dir; /* UNIX home directory string */ - char * home_dir; /* home directory string */ - char * dir_drive; /* home directory drive string */ - char * logon_script; /* logon script string */ - char * profile_path; /* profile path string */ - char * acct_desc ; /* user description string */ - char * workstations; /* login from workstations string */ - char * unknown_str ; /* don't know what this is, yet. */ - char * munged_dial ; /* munged path name and dial-back tel number */ + const char * username; /* UNIX username string */ + const char * domain; /* Windows Domain name */ + const char * nt_username; /* Windows username string */ + const char * full_name; /* user's full name string */ + const char * unix_home_dir; /* UNIX home directory string */ + const char * home_dir; /* home directory string */ + const char * dir_drive; /* home directory drive string */ + const char * logon_script; /* logon script string */ + const char * profile_path; /* profile path string */ + const char * acct_desc ; /* user description string */ + const char * workstations; /* login from workstations string */ + const char * unknown_str ; /* don't know what this is, yet. */ + const char * munged_dial ; /* munged path name and dial-back tel number */ uid_t uid; /* this is a unix uid_t */ gid_t gid; /* this is a unix gid_t */ @@ -775,7 +775,7 @@ enum brl_type {READ_LOCK, WRITE_LOCK}; struct enum_list { int value; - char *name; + const char *name; }; #define BRLOCK_FN_CAST() \ @@ -788,12 +788,12 @@ struct enum_list { br_off start, br_off size) struct parm_struct { - char *label; + const char *label; parm_type type; parm_class class; void *ptr; - BOOL (*special)(char *, char **); - struct enum_list *enum_list; + BOOL (*special)(const char *, char **); + const struct enum_list *enum_list; unsigned flags; union { BOOL bvalue; diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index 2c22d4ab5f..87ef4e39c7 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -75,9 +75,9 @@ static BOOL load_msg(const char *msg_file) /* work out what language to use from locale variables */ -static char *get_lang(void) +static const char *get_lang(void) { - char *vars[] = {"LANGUAGE", "LC_ALL", "LC_LANG", "LANG", NULL}; + const char *vars[] = {"LANGUAGE", "LC_ALL", "LC_LANG", "LANG", NULL}; int i; char *p; @@ -123,7 +123,7 @@ BOOL lang_tdb_init(const char *lang) /* if no lang then we don't translate */ if (!lang) return True; - asprintf(&msg_path, "%s.msg", lib_path((char *)lang)); + asprintf(&msg_path, "%s.msg", lib_path((const char *)lang)); if (stat(msg_path, &st) != 0) { /* the msg file isn't available */ free(msg_path); diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c index 6f51c916d7..2e619c0c6b 100644 --- a/source3/lib/account_pol.c +++ b/source3/lib/account_pol.c @@ -31,7 +31,7 @@ static TDB_CONTEXT *tdb; /* used for driver files */ BOOL init_account_policy(void) { static pid_t local_pid; - char *vstring = "INFO/version"; + const char *vstring = "INFO/version"; uint32 version; if (tdb && local_pid == sys_getpid()) @@ -67,7 +67,7 @@ BOOL init_account_policy(void) static const struct { int field; - char *string; + const char *string; } account_policy_names[] = { {AP_MIN_PASSWORD_LEN, "min password length"}, {AP_PASSWORD_HISTORY, "password history"}, diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c index 2c18bb1198..0bc224ec23 100644 --- a/source3/lib/adt_tree.c +++ b/source3/lib/adt_tree.c @@ -325,7 +325,7 @@ done: Recursive routine to print out all children of a TREE_NODE *************************************************************************/ -static void sorted_tree_print_children( TREE_NODE *node, int debug, char *path ) +static void sorted_tree_print_children( TREE_NODE *node, int debug, const char *path ) { int i; int num_children; diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 04145fd17a..3428377d95 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -30,9 +30,9 @@ static smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS]; Return the name of a charset to give to iconv(). ****************************************************************************/ -static char *charset_name(charset_t ch) +static const char *charset_name(charset_t ch) { - char *ret = NULL; + const char *ret = NULL; if (ch == CH_UCS2) ret = "UCS-2LE"; else if (ch == CH_UNIX) ret = lp_unix_charset(); @@ -75,8 +75,8 @@ void init_iconv(void) for (c1=0;c1from_name) == 0 && strcmp(n2, conv_handles[c1][c2]->to_name) == 0) @@ -140,7 +140,7 @@ size_t convert_string(charset_t from, charset_t to, o_len=destlen; retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len); if(retval==-1) { - char *reason="unknown error"; + const char *reason="unknown error"; switch(errno) { case EINVAL: reason="Incomplete multibyte sequence"; @@ -215,7 +215,7 @@ convert: &inbuf, &i_len, &outbuf, &o_len); if(retval == -1) { - char *reason="unknown error"; + const char *reason="unknown error"; switch(errno) { case EINVAL: reason="Incomplete multibyte sequence"; diff --git a/source3/lib/genrand.c b/source3/lib/genrand.c index fe756169a6..bc9f21c640 100644 --- a/source3/lib/genrand.c +++ b/source3/lib/genrand.c @@ -101,7 +101,7 @@ static void get_random_stream(unsigned char *data, size_t datasize) Note that the hash is not initialised. *****************************************************************/ -static void do_filehash(char *fname, unsigned char *the_hash) +static void do_filehash(const char *fname, unsigned char *the_hash) { unsigned char buf[1011]; /* deliberate weird size */ unsigned char tmp_md4[16]; diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c index e54a74864e..5292e9cf0a 100644 --- a/source3/lib/iconv.c +++ b/source3/lib/iconv.c @@ -29,12 +29,12 @@ static size_t ucs2hex_pull(void *,char **, size_t *, char **, size_t *); static size_t ucs2hex_push(void *,char **, size_t *, char **, size_t *); static size_t iconv_copy(void *,char **, size_t *, char **, size_t *); -struct charset_functions builtin_functions[] = { - {"UCS-2LE", iconv_copy, iconv_copy}, - {"UTF8", utf8_pull, utf8_push}, - {"ASCII", ascii_pull, ascii_push}, - {"UCS2-HEX", ucs2hex_pull, ucs2hex_push}, - {NULL, NULL, NULL} +static struct charset_functions builtin_functions[] = { + {"UCS-2LE", iconv_copy, iconv_copy}, + {"UTF8", utf8_pull, utf8_push}, + {"ASCII", ascii_pull, ascii_push}, + {"UCS2-HEX", ucs2hex_pull, ucs2hex_push}, + {NULL, NULL, NULL} }; static struct charset_functions *charsets = NULL; diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 36a23e28ab..8200b2f8c3 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -81,7 +81,7 @@ static void sig_usr1(void) static void ping_message(int msg_type, pid_t src, void *buf, size_t len) { - char *msg = buf ? buf : "none"; + const char *msg = buf ? buf : "none"; DEBUG(1,("INFO: Received PING message from PID %u [%s]\n",(unsigned int)src, msg)); message_send_pid(src, MSG_PONG, buf, len, True); } diff --git a/source3/lib/pam_errors.c b/source3/lib/pam_errors.c index e1d02151a6..925441fb1d 100644 --- a/source3/lib/pam_errors.c +++ b/source3/lib/pam_errors.c @@ -28,7 +28,7 @@ #endif /* PAM -> NT_STATUS map */ -const static struct { +static const struct { int pam_code; NTSTATUS ntstatus; } pam_to_nt_status_map[] = { @@ -58,7 +58,7 @@ const static struct { }; /* NT_STATUS -> PAM map */ -const static struct { +static const struct { NTSTATUS ntstatus; int pam_code; } nt_status_to_pam_map[] = { diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c index 393fb57994..16a12656b3 100644 --- a/source3/lib/pidfile.c +++ b/source3/lib/pidfile.c @@ -28,7 +28,7 @@ /* return the pid in a pidfile. return 0 if the process (or pidfile) does not exist */ -pid_t pidfile_pid(char *name) +pid_t pidfile_pid(const char *name) { int fd; char pidstr[20]; @@ -69,7 +69,7 @@ pid_t pidfile_pid(char *name) } /* create a pid file in the pid directory. open it and leave it locked */ -void pidfile_create(char *name) +void pidfile_create(const char *name) { int fd; char buf[20]; diff --git a/source3/lib/smbpasswd.c b/source3/lib/smbpasswd.c index c27af5540b..92ae1ffea2 100644 --- a/source3/lib/smbpasswd.c +++ b/source3/lib/smbpasswd.c @@ -60,7 +60,7 @@ BOOL smbpasswd_gethexpwd(char *p, unsigned char *pwd) { int i; unsigned char lonybble, hinybble; - char *hexchars = "0123456789ABCDEF"; + const char *hexchars = "0123456789ABCDEF"; char *p1, *p2; if (!p) return (False); diff --git a/source3/lib/system.c b/source3/lib/system.c index 873b8737d5..fed9b117ca 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1233,7 +1233,7 @@ int sys_dup2(int oldfd, int newfd) Wrapper for Admin Logs. ****************************************************************************/ -void sys_adminlog(int priority, char *format_str, ...) +void sys_adminlog(int priority, const char *format_str, ...) { va_list ap; int ret; diff --git a/source3/lib/util.c b/source3/lib/util.c index 0adfe34032..39c58534cd 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -676,7 +676,7 @@ smb_ucs2_t *unix_clean_path(const smb_ucs2_t *s) Make a dir struct. ****************************************************************************/ -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date) +void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date) { char *p; pstring mask2; @@ -1398,7 +1398,7 @@ gid_t nametogid(const char *name) Something really nasty happened - panic ! ********************************************************************/ -void smb_panic(char *why) +void smb_panic(const char *why) { char *cmd = lp_panic_action(); int result; @@ -1463,7 +1463,7 @@ char *readdirname(DIR *p) of a path matches a (possibly wildcarded) entry in a namelist. ********************************************************************/ -BOOL is_in_path(char *name, name_compare_entry *namelist) +BOOL is_in_path(const char *name, name_compare_entry *namelist) { pstring last_component; char *p; @@ -2247,7 +2247,7 @@ BOOL ms_has_wild_w(const smb_ucs2_t *s) of the ".." name. *******************************************************************/ -BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive) +BOOL mask_match(const char *string, char *pattern, BOOL is_case_sensitive) { fstring p2, s2; diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index edd59ae109..824987f189 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -79,9 +79,9 @@ NT_USER_TOKEN system_token = { Lookup string names for SID types. ****************************************************************************/ -const static struct { +static const struct { enum SID_NAME_USE sid_type; - char *string; + const char *string; } sid_name_type[] = { {SID_NAME_USER, "User"}, {SID_NAME_DOM_GRP, "Domain Group"}, @@ -181,7 +181,8 @@ NT_USER_TOKEN *get_system_token(void) void split_domain_name(const char *fullname, char *domain, char *name) { pstring full_name; - char *p, *sep; + const char *sep; + char *p; sep = lp_winbind_separator(); diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 2acb20861b..e162e5cd77 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -43,7 +43,7 @@ BOOL is_a_socket(int fd) enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON}; typedef struct smb_socket_option { - char *name; + const char *name; int level; int option; int value; diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 7d056e98d2..a76278e532 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -576,7 +576,7 @@ size_t strhex_to_str(char *p, size_t len, const char *strhex) size_t i; size_t num_chars = 0; unsigned char lonybble, hinybble; - char *hexchars = "0123456789ABCDEF"; + const char *hexchars = "0123456789ABCDEF"; char *p1 = NULL, *p2 = NULL; for (i = 0; i < len && strhex[i] != 0; i++) { @@ -958,7 +958,7 @@ void split_at_last_component(char *path, char *front, char sep, char *back) Write an octal as a string. ****************************************************************************/ -char *octal_string(int i) +const char *octal_string(int i) { static char ret[64]; if (i == -1) diff --git a/source3/libads/disp_sec.c b/source3/libads/disp_sec.c index a7b0bf6f07..c9de447e69 100644 --- a/source3/libads/disp_sec.c +++ b/source3/libads/disp_sec.c @@ -22,7 +22,7 @@ static struct perm_mask_str { uint32 mask; - char *str; + const char *str; } perms[] = { {SEC_RIGHTS_FULL_CTRL, "[Full Control]"}, @@ -83,7 +83,7 @@ static void ads_disp_perms(uint32 type) /* display ACE */ static void ads_disp_ace(SEC_ACE *sec_ace) { - char *access_type = "UNKNOWN"; + const char *access_type = "UNKNOWN"; if (!sec_ace_object(sec_ace->type)) { printf("------- ACE (type: 0x%02x, flags: 0x%02x, size: 0x%02x, mask: 0x%x)\n", @@ -121,7 +121,7 @@ static void ads_disp_ace(SEC_ACE *sec_ace) } /* display ACL */ -static void ads_disp_acl(SEC_ACL *sec_acl, char *type) +static void ads_disp_acl(SEC_ACL *sec_acl, const char *type) { if (!sec_acl) printf("------- (%s) ACL not present\n", type); diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 1ed1da0b5d..1743bc2dd6 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1184,8 +1184,8 @@ static void dump_string(const char *field, char **values) static BOOL ads_dump_field(char *field, void **values, void *data_area) { - struct { - char *name; + const struct { + const char *name; BOOL string; void (*handler)(const char *, struct berval **); } handlers[] = { diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index b2ee5f2265..87ea058896 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -167,7 +167,7 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods, } struct valmap_to_ads { - char *valname; + const char *valname; BOOL (*fn)(TALLOC_CTX *, ADS_MODLIST *, const REGISTRY_VALUE *); }; @@ -177,7 +177,7 @@ struct valmap_to_ads { static void map_regval_to_ads(TALLOC_CTX *ctx, ADS_MODLIST *mods, REGISTRY_VALUE *value) { - struct valmap_to_ads map[] = { + const struct valmap_to_ads map[] = { {SPOOL_REG_ASSETNUMBER, map_sz}, {SPOOL_REG_BYTESPERMINUTE, map_dword}, {SPOOL_REG_DEFAULTPRIORITY, map_dword}, @@ -250,7 +250,7 @@ static void map_regval_to_ads(TALLOC_CTX *ctx, ADS_MODLIST *mods, WERROR get_remote_printer_publishing_data(struct cli_state *cli, TALLOC_CTX *mem_ctx, ADS_MODLIST *mods, - char *printer) + const char *printer) { WERROR result; char *printername, *servername; diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c index b7cfca41fb..b967927871 100644 --- a/source3/libsmb/asn1.c +++ b/source3/libsmb/asn1.c @@ -338,7 +338,7 @@ BOOL asn1_read_OID(ASN1_DATA *data, char **OID) } /* check that the next object ID is correct */ -BOOL asn1_check_OID(ASN1_DATA *data, char *OID) +BOOL asn1_check_OID(ASN1_DATA *data, const char *OID) { char *id; diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c index 8f4bdf7be6..5ab6bef87b 100644 --- a/source3/libsmb/clidgram.c +++ b/source3/libsmb/clidgram.c @@ -26,7 +26,7 @@ * cli_send_mailslot, send a mailslot for client code ... */ -int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, +int cli_send_mailslot(int dgram_sock, BOOL unique, const char *mailslot, char *buf, int len, const char *srcname, int src_type, const char *dstname, int dest_type, @@ -100,7 +100,7 @@ int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot, /* * cli_get_response: Get a response ... */ -int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz) +int cli_get_response(int dgram_sock, BOOL unique, const char *mailslot, char *buf, int bufsiz) { struct packet_struct *packet; diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index c843d49d27..ed1286d627 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -327,7 +327,7 @@ void cli_shutdown(struct cli_state *cli) Set socket options on a open connection. ****************************************************************************/ -void cli_sockopt(struct cli_state *cli, char *options) +void cli_sockopt(struct cli_state *cli, const char *options) { set_socket_options(cli->fd, options); } diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c index f5281eb047..12a7b5dba1 100644 --- a/source3/libsmb/clierror.c +++ b/source3/libsmb/clierror.c @@ -33,7 +33,7 @@ static const struct { int err; - char *message; + const char *message; } rap_errmap[] = { {5, "RAP5: User has insufficient privilege" }, @@ -62,7 +62,7 @@ static const struct /**************************************************************************** return a description of an SMB error ****************************************************************************/ -static char *cli_smb_errstr(struct cli_state *cli) +static const char *cli_smb_errstr(struct cli_state *cli) { return smb_dos_errstr(cli->inbuf); } @@ -73,7 +73,7 @@ static char *cli_smb_errstr(struct cli_state *cli) in which case they can be safely ignored. ****************************************************************************/ -char *cli_errstr(struct cli_state *cli) +const char *cli_errstr(struct cli_state *cli) { static fstring cli_error_message; uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), errnum; diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 54a8a6ffe8..a7b11d777e 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -94,7 +94,7 @@ cleanup_princ: /* get a kerberos5 ticket for the given service */ -DATA_BLOB krb5_get_ticket(char *principal, time_t time_offset) +DATA_BLOB krb5_get_ticket(const char *principal, time_t time_offset) { krb5_error_code retval; krb5_data packet; diff --git a/source3/libsmb/cliprint.c b/source3/libsmb/cliprint.c index 92fbf02e91..bfa33bc514 100644 --- a/source3/libsmb/cliprint.c +++ b/source3/libsmb/cliprint.c @@ -27,7 +27,7 @@ This function contains code to prevent core dumps if the server returns invalid data. *****************************************************************************/ -static char *fix_char_ptr(unsigned int datap, unsigned int converter, +static const char *fix_char_ptr(unsigned int datap, unsigned int converter, char *rdata, int rdrcnt) { if (datap == 0) { /* turn NULL pointers into zero length strings */ diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index b4924fd773..792a3e7aa0 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -26,7 +26,7 @@ /**************************************************************************** Call a remote api on an arbitrary pipe. takes param, data and setup buffers. ****************************************************************************/ -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, +BOOL cli_api_pipe(struct cli_state *cli, const char *pipe_name, uint16 *setup, uint32 setup_count, uint32 max_setup_count, char *params, uint32 param_count, uint32 max_param_count, char *data, uint32 data_count, uint32 max_data_count, @@ -176,7 +176,7 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, co char *sname = p; int type = SVAL(p,14); int comment_offset = IVAL(p,16) & 0xFFFF; - char *cmnt = comment_offset?(rdata+comment_offset-converter):""; + const char *cmnt = comment_offset?(rdata+comment_offset-converter):""; pstring s1, s2; pull_ascii_pstring(s1, sname); @@ -253,7 +253,7 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, for (i = 0;i < count;i++, p += 26) { char *sname = p; int comment_offset = (IVAL(p,22) & 0xFFFF)-converter; - char *cmnt = comment_offset?(rdata+comment_offset):""; + const char *cmnt = comment_offset?(rdata+comment_offset):""; pstring s1, s2; if (comment_offset < 0 || comment_offset > rdrcnt) continue; diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c index 9c3ec212d5..948e88061a 100644 --- a/source3/libsmb/clirap2.c +++ b/source3/libsmb/clirap2.c @@ -128,7 +128,7 @@ pull_ascii_pstring(s, off?(r+off-c):"");\ } while(0) -static char *make_header(char *param, uint16 apinum, char *reqfmt, char *datafmt) +static char *make_header(char *param, uint16 apinum, const char *reqfmt, const char *datafmt) { PUTWORD(param,apinum); if (reqfmt) diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index d35b0dfdfd..0715aa7f1a 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -248,7 +248,8 @@ ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, si issue a single SMBwrite and don't wait for a reply ****************************************************************************/ -static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint16 mode, char *buf, +static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, + uint16 mode, const char *buf, size_t size, int i) { char *p; @@ -319,7 +320,7 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1 ssize_t cli_write(struct cli_state *cli, int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size) + const char *buf, off_t offset, size_t size) { int bwritten = 0; int issued = 0; diff --git a/source3/libsmb/doserr.c b/source3/libsmb/doserr.c index 02db625685..c9de4cf319 100644 --- a/source3/libsmb/doserr.c +++ b/source3/libsmb/doserr.c @@ -24,7 +24,7 @@ typedef const struct { - char *dos_errstr; + const char *dos_errstr; WERROR werror; } werror_code_struct; @@ -73,7 +73,7 @@ werror_code_struct dos_errs[] = /***************************************************************************** returns a DOS error message. not amazingly helpful, but better than a number. *****************************************************************************/ -char *dos_errstr(WERROR werror) +const char *dos_errstr(WERROR werror) { static pstring msg; int idx = 0; diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 8bd29b55c0..09340caccd 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -45,7 +45,7 @@ */ /* NT status -> dos error map */ -const static struct { +static const struct { uint8 dos_class; uint32 dos_code; NTSTATUS ntstatus; @@ -611,7 +611,7 @@ const static struct { /* dos -> nt status error map */ -const static struct { +static const struct { uint8 dos_class; uint32 dos_code; NTSTATUS ntstatus; @@ -866,7 +866,7 @@ const static struct { }; /* errmap NTSTATUS->Win32 */ -const static struct { +static const struct { NTSTATUS ntstatus; WERROR werror; } ntstatus_to_werror_map[] = { diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c index d38e2ff0ec..30ce5b6b10 100644 --- a/source3/libsmb/nmblib.c +++ b/source3/libsmb/nmblib.c @@ -25,7 +25,7 @@ int num_good_sends = 0; int num_good_receives = 0; static const struct opcode_names { - char *nmb_opcode_name; + const char *nmb_opcode_name; int opcode; } nmb_header_opcode_names[] = { {"Query", 0 }, @@ -57,7 +57,7 @@ static const char *lookup_opcode_name( int opcode ) /**************************************************************************** print out a res_rec structure ****************************************************************************/ -static void debug_nmb_res_rec(struct res_rec *res, char *hdr) +static void debug_nmb_res_rec(struct res_rec *res, const char *hdr) { int i, j; @@ -1005,7 +1005,7 @@ struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id) queue. The packet must be a reply packet and have the specified mailslot name The timeout is in milliseconds ***************************************************************************/ -struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name) +struct packet_struct *receive_dgram_packet(int fd, int t, const char *mailslot_name) { struct packet_struct *p; @@ -1024,7 +1024,7 @@ struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name) /**************************************************************************** see if a datagram has the right mailslot name ***************************************************************************/ -BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name) +BOOL match_mailslot_name(struct packet_struct *p, const char *mailslot_name) { struct dgram_packet *dgram = &p->packet.dgram; char *buf; diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c index e494995f86..dbad05b91e 100644 --- a/source3/libsmb/nterr.c +++ b/source3/libsmb/nterr.c @@ -24,7 +24,7 @@ typedef const struct { - char *nt_errstr; + const char *nt_errstr; NTSTATUS nt_errcode; } nt_err_code_struct; @@ -575,7 +575,7 @@ nt_err_code_struct nt_err_desc[] = /***************************************************************************** returns an NT error message. not amazingly helpful, but better than a number. *****************************************************************************/ -char *nt_errstr(NTSTATUS nt_code) +const char *nt_errstr(NTSTATUS nt_code) { static pstring msg; int idx = 0; @@ -597,7 +597,7 @@ char *nt_errstr(NTSTATUS nt_code) Print friendler version fo NT error code ***********************************************************************/ -char *get_friendly_nt_error_msg(NTSTATUS nt_code) +const char *get_friendly_nt_error_msg(NTSTATUS nt_code) { int idx = 0; @@ -617,7 +617,7 @@ char *get_friendly_nt_error_msg(NTSTATUS nt_code) /***************************************************************************** returns an NT_STATUS constant as a string for inclusion in autogen C code *****************************************************************************/ -char *get_nt_error_c_code(NTSTATUS nt_code) +const char *get_nt_error_c_code(NTSTATUS nt_code) { static pstring out; int idx = 0; diff --git a/source3/libsmb/smberr.c b/source3/libsmb/smberr.c index 724c8edd54..82efbdb689 100644 --- a/source3/libsmb/smberr.c +++ b/source3/libsmb/smberr.c @@ -37,9 +37,9 @@ typedef const struct { - char *name; + const char *name; int code; - char *message; + const char *message; } err_code_struct; /* Dos Error Messages */ @@ -142,7 +142,7 @@ err_code_struct hard_msgs[] = { const struct { int code; - char *class; + const char *class; err_code_struct *err_msgs; } err_classes[] = { {0,"SUCCESS",NULL}, @@ -160,7 +160,7 @@ const struct /**************************************************************************** return a SMB error name from a class and code ****************************************************************************/ -char *smb_dos_err_name(uint8 class, uint16 num) +const char *smb_dos_err_name(uint8 class, uint16 num) { static pstring ret; int i,j; @@ -184,7 +184,7 @@ char *smb_dos_err_name(uint8 class, uint16 num) /* Return a string for a DOS error */ -char *get_dos_error_msg(WERROR result) +const char *get_dos_error_msg(WERROR result) { uint16 errnum; @@ -196,7 +196,7 @@ char *get_dos_error_msg(WERROR result) /**************************************************************************** return a SMB error class name as a string. ****************************************************************************/ -char *smb_dos_err_class(uint8 class) +const char *smb_dos_err_class(uint8 class) { static pstring ret; int i; diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c index 4fc3914481..97d6071e71 100644 --- a/source3/libsmb/unexpected.c +++ b/source3/libsmb/unexpected.c @@ -110,7 +110,7 @@ void clear_unexpected(time_t t) static struct packet_struct *matched_packet; static int match_id; static enum packet_type match_type; -static char *match_name; +static const char *match_name; /**************************************************************************** tdb traversal fn to find a matching 137 packet @@ -144,7 +144,7 @@ static int traverse_match(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void check for a particular packet in the unexpected packet queue **************************************************************************/ struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, - char *mailslot_name) + const char *mailslot_name) { TDB_CONTEXT *tdb2; diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c index 7ff2d4171e..932d926a91 100644 --- a/source3/nmbd/nmbd_namelistdb.c +++ b/source3/nmbd/nmbd_namelistdb.c @@ -173,7 +173,7 @@ void update_name_ttl( struct name_record *namerec, int ttl ) * ************************************************************************** ** */ struct name_record *add_name_to_subnet( struct subnet_record *subrec, - char *name, + const char *name, int type, uint16 nb_flags, int ttl, @@ -525,7 +525,7 @@ void add_samba_names_to_subnet( struct subnet_record *subrec ) static void dump_subnet_namelist( struct subnet_record *subrec, XFILE *fp) { struct name_record *namerec; - char *src_type; + const char *src_type; struct tm *tm; int i; diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 894f6bb7d6..d83cd10d0c 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -887,7 +887,7 @@ void reply_netbios_packet(struct packet_struct *orig_packet, struct res_rec answers; struct nmb_packet *orig_nmb = &orig_packet->packet.nmb; BOOL loopback_this_packet = False; - char *packet_type = "unknown"; + const char *packet_type = "unknown"; /* Check if we are sending to or from ourselves. */ if(ismyip(orig_packet->ip) && (orig_packet->port == global_nmb_port)) @@ -1929,7 +1929,7 @@ BOOL listen_for_packets(BOOL run_election) /**************************************************************************** Construct and send a netbios DGRAM. **************************************************************************/ -BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len, +BOOL send_mailslot(BOOL unique, const char *mailslot,char *buf,int len, const char *srcname, int src_type, const char *dstname, int dest_type, struct in_addr dest_ip,struct in_addr src_ip, diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 48fc8eabbf..39724921a4 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -62,8 +62,8 @@ static void send_repl_message(uint32 low_serial) Process a domain logon packet **************************************************************************/ -void process_logon_packet(struct packet_struct *p,char *buf,int len, - char *mailslot) +void process_logon_packet(struct packet_struct *p, char *buf,int len, + const char *mailslot) { struct dgram_packet *dgram = &p->packet.dgram; pstring my_name; diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c index de05ee973c..40d07aae16 100644 --- a/source3/nmbd/nmbd_sendannounce.c +++ b/source3/nmbd/nmbd_sendannounce.c @@ -33,7 +33,7 @@ extern BOOL found_lm_clients; Send a browser reset packet. **************************************************************************/ -void send_browser_reset(int reset_type, char *to_name, int to_type, struct in_addr to_ip) +void send_browser_reset(int reset_type, const char *to_name, int to_type, struct in_addr to_ip) { pstring outbuf; char *p; diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c index 7875cd06b4..6296826425 100644 --- a/source3/nmbd/nmbd_subnetdb.c +++ b/source3/nmbd/nmbd_subnetdb.c @@ -105,7 +105,7 @@ void close_subnet(struct subnet_record *subrec) Create a subnet entry. ****************************************************************************/ -static struct subnet_record *make_subnet(char *name, enum subnet_type type, +static struct subnet_record *make_subnet(const char *name, enum subnet_type type, struct in_addr myip, struct in_addr bcast_ip, struct in_addr mask_ip) { diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 87391b35df..4ef476f814 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -100,7 +100,7 @@ static void get_global_id_and_update(SMB_BIG_UINT *current_id, BOOL update) /**************************************************************************** possibly call the WINS hook external program when a WINS change is made *****************************************************************************/ -static void wins_hook(char *operation, struct name_record *namerec, int ttl) +static void wins_hook(const char *operation, struct name_record *namerec, int ttl) { pstring command; char *cmd = lp_wins_hook(); @@ -250,7 +250,8 @@ BOOL initialise_wins(void) kbuf.dptr; newkey = tdb_nextkey(tdb, kbuf), safe_free(kbuf.dptr), kbuf=newkey) { - pstring name_type, name, ip_str; + fstring name_type; + pstring name, ip_str; char *p; int type = 0; int nb_flags; diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index f03b0493de..720cf5822c 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -573,7 +573,7 @@ static BOOL print_domain_groups(void) static BOOL wbinfo_set_auth_user(char *username) { - char *password; + const char *password; fstring user, domain; /* Separate into user and password */ diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 61e585902c..71e426e818 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -207,7 +207,7 @@ static void sighup_handler(int signum) struct dispatch_table { enum winbindd_cmd cmd; enum winbindd_result (*fn)(struct winbindd_cli_state *state); - char *winbindd_cmd_name; + const char *winbindd_cmd_name; }; static struct dispatch_table dispatch_table[] = { diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 621aa67e6a..2cc16ee79b 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -535,29 +535,29 @@ static int default_server_announce; #define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct)) /* prototypes for the special type handlers */ -static BOOL handle_include(char *pszParmValue, char **ptr); -static BOOL handle_copy(char *pszParmValue, char **ptr); -static BOOL handle_vfs_object(char *pszParmValue, char **ptr); -static BOOL handle_source_env(char *pszParmValue, char **ptr); -static BOOL handle_netbios_name(char *pszParmValue, char **ptr); -static BOOL handle_winbind_uid(char *pszParmValue, char **ptr); -static BOOL handle_winbind_gid(char *pszParmValue, char **ptr); -static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr); -static BOOL handle_debug_list( char *pszParmValue, char **ptr ); -static BOOL handle_workgroup( char *pszParmValue, char **ptr ); -static BOOL handle_netbios_aliases( char *pszParmValue, char **ptr ); -static BOOL handle_netbios_scope( char *pszParmValue, char **ptr ); - -static BOOL handle_ldap_machine_suffix ( char *pszParmValue, char **ptr ); -static BOOL handle_ldap_user_suffix ( char *pszParmValue, char **ptr ); -static BOOL handle_ldap_suffix ( char *pszParmValue, char **ptr ); - -static BOOL handle_acl_compatibility(char *pszParmValue, char **ptr); +static BOOL handle_include(const char *pszParmValue, char **ptr); +static BOOL handle_copy(const char *pszParmValue, char **ptr); +static BOOL handle_vfs_object(const char *pszParmValue, char **ptr); +static BOOL handle_source_env(const char *pszParmValue, char **ptr); +static BOOL handle_netbios_name(const char *pszParmValue, char **ptr); +static BOOL handle_winbind_uid(const char *pszParmValue, char **ptr); +static BOOL handle_winbind_gid(const char *pszParmValue, char **ptr); +static BOOL handle_non_unix_account_range(const char *pszParmValue, char **ptr); +static BOOL handle_debug_list( const char *pszParmValue, char **ptr ); +static BOOL handle_workgroup( const char *pszParmValue, char **ptr ); +static BOOL handle_netbios_aliases( const char *pszParmValue, char **ptr ); +static BOOL handle_netbios_scope( const char *pszParmValue, char **ptr ); + +static BOOL handle_ldap_machine_suffix ( const char *pszParmValue, char **ptr ); +static BOOL handle_ldap_user_suffix ( const char *pszParmValue, char **ptr ); +static BOOL handle_ldap_suffix ( const char *pszParmValue, char **ptr ); + +static BOOL handle_acl_compatibility(const char *pszParmValue, char **ptr); static void set_server_role(void); static void set_default_server_announce_type(void); -static struct enum_list enum_protocol[] = { +static const struct enum_list enum_protocol[] = { {PROTOCOL_NT1, "NT1"}, {PROTOCOL_LANMAN2, "LANMAN2"}, {PROTOCOL_LANMAN1, "LANMAN1"}, @@ -567,7 +567,7 @@ static struct enum_list enum_protocol[] = { {-1, NULL} }; -static struct enum_list enum_security[] = { +static const struct enum_list enum_security[] = { {SEC_SHARE, "SHARE"}, {SEC_USER, "USER"}, {SEC_SERVER, "SERVER"}, @@ -578,7 +578,7 @@ static struct enum_list enum_security[] = { {-1, NULL} }; -static struct enum_list enum_printing[] = { +static const struct enum_list enum_printing[] = { {PRINT_SYSV, "sysv"}, {PRINT_AIX, "aix"}, {PRINT_HPUX, "hpux"}, @@ -597,7 +597,7 @@ static struct enum_list enum_printing[] = { {-1, NULL} }; -static struct enum_list enum_ldap_ssl[] = { +static const struct enum_list enum_ldap_ssl[] = { #ifdef WITH_LDAP_SAMCONFIG {LDAP_SSL_ON, "Yes"}, {LDAP_SSL_ON, "yes"}, @@ -613,7 +613,7 @@ static struct enum_list enum_ldap_ssl[] = { {-1, NULL} }; -static struct enum_list enum_ldap_passwd_sync[] = { +static const struct enum_list enum_ldap_passwd_sync[] = { {LDAP_PASSWD_SYNC_ON, "Yes"}, {LDAP_PASSWD_SYNC_ON, "yes"}, {LDAP_PASSWD_SYNC_ON, "on"}, @@ -635,7 +635,7 @@ static struct enum_list enum_ldap_passwd_sync[] = { #define ANNOUNCE_AS_WFW 3 #define ANNOUNCE_AS_NT_WORKSTATION 4 -static struct enum_list enum_announce_as[] = { +static const struct enum_list enum_announce_as[] = { {ANNOUNCE_AS_NT_SERVER, "NT"}, {ANNOUNCE_AS_NT_SERVER, "NT Server"}, {ANNOUNCE_AS_NT_WORKSTATION, "NT Workstation"}, @@ -644,13 +644,13 @@ static struct enum_list enum_announce_as[] = { {-1, NULL} }; -static struct enum_list enum_case[] = { +static const struct enum_list enum_case[] = { {CASE_LOWER, "lower"}, {CASE_UPPER, "upper"}, {-1, NULL} }; -static struct enum_list enum_bool_auto[] = { +static const struct enum_list enum_bool_auto[] = { {False, "No"}, {False, "False"}, {False, "0"}, @@ -667,7 +667,7 @@ static struct enum_list enum_bool_auto[] = { #define CSC_POLICY_PROGRAMS 2 #define CSC_POLICY_DISABLE 3 -static struct enum_list enum_csc_policy[] = { +static const struct enum_list enum_csc_policy[] = { {CSC_POLICY_MANUAL, "manual"}, {CSC_POLICY_DOCUMENTS, "documents"}, {CSC_POLICY_PROGRAMS, "programs"}, @@ -696,7 +696,7 @@ static struct enum_list enum_csc_policy[] = { level security. */ -static struct enum_list enum_map_to_guest[] = { +static const struct enum_list enum_map_to_guest[] = { {NEVER_MAP_TO_GUEST, "Never"}, {MAP_TO_GUEST_ON_BAD_USER, "Bad User"}, {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"}, @@ -1821,15 +1821,15 @@ FN_GLOBAL_INTEGER(lp_name_cache_timeout, &Globals.name_cache_timeout) /* local prototypes */ -static int map_parameter(char *pszParmName); +static int map_parameter(const char *pszParmName); static BOOL set_boolean(BOOL *pb, const char *pszParmValue); static int getservicebyname(const char *pszServiceName, service * pserviceDest); static void copy_service(service * pserviceDest, service * pserviceSource, BOOL *pcopymapDest); static BOOL service_ok(int iService); -static BOOL do_parameter(char *pszParmName, char *pszParmValue); -static BOOL do_section(char *pszSectionName); +static BOOL do_parameter(const char *pszParmName, const char *pszParmValue); +static BOOL do_section(const char *pszSectionName); static void init_copymap(service * pservice); /* This is a helper function for parametrical options support. */ @@ -2208,7 +2208,7 @@ int lp_add_service(const char *pszService, int iDefaultService) Add the IPC service. ***************************************************************************/ -static BOOL lp_add_ipc(char *ipc_name, BOOL guest_ok) +static BOOL lp_add_ipc(const char *ipc_name, BOOL guest_ok) { pstring comment; int i = add_a_service(&sDefault, ipc_name); @@ -2278,7 +2278,7 @@ BOOL lp_add_printer(const char *pszPrintername, int iDefaultService) Returns False if the parameter string is not recognised, else TRUE. ***************************************************************************/ -static int map_parameter(char *pszParmName) +static int map_parameter(const char *pszParmName) { int iIndex; @@ -2566,7 +2566,7 @@ BOOL lp_file_list_changed(void) Note: We must *NOT* use string_set() here as ptr points to global_myname. ***************************************************************************/ -static BOOL handle_netbios_name(char *pszParmValue, char **ptr) +static BOOL handle_netbios_name(const char *pszParmValue, char **ptr) { pstring netbios_name; @@ -2582,17 +2582,17 @@ static BOOL handle_netbios_name(char *pszParmValue, char **ptr) return (True); } -static BOOL handle_workgroup(char *pszParmValue, char **ptr) +static BOOL handle_workgroup(const char *pszParmValue, char **ptr) { return set_global_myworkgroup(pszParmValue); } -static BOOL handle_netbios_scope(char *pszParmValue, char **ptr) +static BOOL handle_netbios_scope(const char *pszParmValue, char **ptr) { return set_global_scope(pszParmValue); } -static BOOL handle_netbios_aliases(char *pszParmValue, char **ptr) +static BOOL handle_netbios_aliases(const char *pszParmValue, char **ptr) { Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL); return set_netbios_aliases((const char **)Globals.szNetbiosAliases); @@ -2652,7 +2652,7 @@ static BOOL source_env(char **lines) Handle the source environment operation. ***************************************************************************/ -static BOOL handle_source_env(char *pszParmValue, char **ptr) +static BOOL handle_source_env(const char *pszParmValue, char **ptr) { pstring fname; char *p = fname; @@ -2692,7 +2692,7 @@ static BOOL handle_source_env(char *pszParmValue, char **ptr) Handle the interpretation of the vfs object parameter. *************************************************************************/ -static BOOL handle_vfs_object(char *pszParmValue, char **ptr) +static BOOL handle_vfs_object(const char *pszParmValue, char **ptr) { /* Set string value */ @@ -2708,7 +2708,7 @@ static BOOL handle_vfs_object(char *pszParmValue, char **ptr) Handle the include operation. ***************************************************************************/ -static BOOL handle_include(char *pszParmValue, char **ptr) +static BOOL handle_include(const char *pszParmValue, char **ptr) { pstring fname; pstrcpy(fname, pszParmValue); @@ -2731,7 +2731,7 @@ static BOOL handle_include(char *pszParmValue, char **ptr) Handle the interpretation of the copy parameter. ***************************************************************************/ -static BOOL handle_copy(char *pszParmValue, char **ptr) +static BOOL handle_copy(const char *pszParmValue, char **ptr) { BOOL bRetval; int iTemp; @@ -2827,7 +2827,7 @@ BOOL lp_non_unix_account_range(uint32 *low, uint32 *high) /* Do some simple checks on "winbind [ug]id" parameter values */ -static BOOL handle_winbind_uid(char *pszParmValue, char **ptr) +static BOOL handle_winbind_uid(const char *pszParmValue, char **ptr) { uint32 low, high; @@ -2844,7 +2844,7 @@ static BOOL handle_winbind_uid(char *pszParmValue, char **ptr) return True; } -static BOOL handle_winbind_gid(char *pszParmValue, char **ptr) +static BOOL handle_winbind_gid(const char *pszParmValue, char **ptr) { uint32 low, high; @@ -2865,7 +2865,7 @@ static BOOL handle_winbind_gid(char *pszParmValue, char **ptr) Do some simple checks on "non unix account range" parameter values. ***************************************************************************/ -static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr) +static BOOL handle_non_unix_account_range(const char *pszParmValue, char **ptr) { uint32 low, high; @@ -2886,7 +2886,7 @@ static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr) Handle the DEBUG level list. ***************************************************************************/ -static BOOL handle_debug_list( char *pszParmValueIn, char **ptr ) +static BOOL handle_debug_list( const char *pszParmValueIn, char **ptr ) { pstring pszParmValue; @@ -2899,7 +2899,7 @@ static BOOL handle_debug_list( char *pszParmValueIn, char **ptr ) Handle the ldap machine suffix option. ***************************************************************************/ -static BOOL handle_ldap_machine_suffix( char *pszParmValue, char **ptr) +static BOOL handle_ldap_machine_suffix( const char *pszParmValue, char **ptr) { pstring suffix; @@ -2923,7 +2923,7 @@ static BOOL handle_ldap_machine_suffix( char *pszParmValue, char **ptr) Handle the ldap user suffix option. ***************************************************************************/ -static BOOL handle_ldap_user_suffix( char *pszParmValue, char **ptr) +static BOOL handle_ldap_user_suffix( const char *pszParmValue, char **ptr) { pstring suffix; @@ -2948,7 +2948,7 @@ static BOOL handle_ldap_user_suffix( char *pszParmValue, char **ptr) to be set as well. ***************************************************************************/ -static BOOL handle_ldap_suffix( char *pszParmValue, char **ptr) +static BOOL handle_ldap_suffix( const char *pszParmValue, char **ptr) { pstring suffix; pstring user_suffix; @@ -2981,7 +2981,7 @@ static BOOL handle_ldap_suffix( char *pszParmValue, char **ptr) return True; } -static BOOL handle_acl_compatibility(char *pszParmValue, char **ptr) +static BOOL handle_acl_compatibility(const char *pszParmValue, char **ptr) { if (strequal(pszParmValue, "auto")) string_set(ptr, ""); @@ -3027,7 +3027,7 @@ void *lp_local_ptr(int snum, void *ptr) then assume we are in the globals. ***************************************************************************/ -BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue) +BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue) { int parmnum, i, slen; void *parm_ptr = NULL; /* where we are going to store the result */ @@ -3187,7 +3187,7 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue) Process a parameter. ***************************************************************************/ -static BOOL do_parameter(char *pszParmName, char *pszParmValue) +static BOOL do_parameter(const char *pszParmName, const char *pszParmValue) { if (!bInGlobalSection && bGlobalOnly) return (True); @@ -3328,7 +3328,7 @@ void init_locals(void) Returns True on success, False on failure. ***************************************************************************/ -static BOOL do_section(char *pszSectionName) +static BOOL do_section(const char *pszSectionName) { BOOL bRetval; BOOL isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) || @@ -4068,7 +4068,7 @@ void lp_remove_service(int snum) Copy a service. ********************************************************************/ -void lp_copy_service(int snum, char *new_name) +void lp_copy_service(int snum, const char *new_name) { char *oldname = lp_servicename(snum); do_section(new_name); diff --git a/source3/param/params.c b/source3/param/params.c index bc93a1fedf..892e5476cc 100644 --- a/source3/param/params.c +++ b/source3/param/params.c @@ -201,7 +201,7 @@ static int Continuation(char *line, int pos ) } -static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) ) +static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *) ) /* ------------------------------------------------------------------------ ** * Scan a section name, and pass the name to function sfunc(). * @@ -219,7 +219,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) ) int c; int i; int end; - char *func = "params.c:Section() -"; + const char *func = "params.c:Section() -"; i = 0; /* is the offset of the next free byte in bufr[] and */ end = 0; /* is the current "end of string" offset. In most */ @@ -297,7 +297,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) ) return( False ); } /* Section */ -static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(char *, char *), int c ) +static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *), int c ) /* ------------------------------------------------------------------------ ** * Scan a parameter name and value, and pass these two fields to pfunc(). * @@ -325,7 +325,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(char *, char *), int c ) int i = 0; /* Position within bufr. */ int end = 0; /* bufr[end] is current end-of-string. */ int vstart = 0; /* Starting position of the parameter value. */ - char *func = "params.c:Parameter() -"; + const char *func = "params.c:Parameter() -"; /* Read the parameter name. */ while( 0 == vstart ) /* Loop until we've found the start of the value. */ @@ -445,8 +445,8 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(char *, char *), int c ) } /* Parameter */ static BOOL Parse( myFILE *InFile, - BOOL (*sfunc)(char *), - BOOL (*pfunc)(char *, char *) ) + BOOL (*sfunc)(const char *), + BOOL (*pfunc)(const char *, const char *) ) /* ------------------------------------------------------------------------ ** * Scan & parse the input. * @@ -505,7 +505,7 @@ static BOOL Parse( myFILE *InFile, return( True ); } /* Parse */ -static myFILE *OpenConfFile( char *FileName ) +static myFILE *OpenConfFile( const char *FileName ) /* ------------------------------------------------------------------------ ** * Open a configuration file. * @@ -516,7 +516,7 @@ static myFILE *OpenConfFile( char *FileName ) * ------------------------------------------------------------------------ ** */ { - char *func = "params.c:OpenConfFile() -"; + const char *func = "params.c:OpenConfFile() -"; extern BOOL in_client; int lvl = in_client?1:0; myFILE *ret; @@ -538,9 +538,9 @@ static myFILE *OpenConfFile( char *FileName ) return( ret ); } /* OpenConfFile */ -BOOL pm_process( char *FileName, - BOOL (*sfunc)(char *), - BOOL (*pfunc)(char *, char *) ) +BOOL pm_process( const char *FileName, + BOOL (*sfunc)(const char *), + BOOL (*pfunc)(const char *, const char *) ) /* ------------------------------------------------------------------------ ** * Process the named parameter file. * @@ -557,7 +557,7 @@ BOOL pm_process( char *FileName, { int result; myFILE *InFile; - char *func = "params.c:pm_process() -"; + const char *func = "params.c:pm_process() -"; InFile = OpenConfFile( FileName ); /* Open the config file. */ if( NULL == InFile ) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index ed5ddda4da..e13f0e9dfb 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -304,7 +304,7 @@ NTSTATUS pdb_init_sam_pw(SAM_ACCOUNT **new_sam_acct, const struct passwd *pwd) /** * Free the contets of the SAM_ACCOUNT, but not the structure. * - * Also wipes the LM and NT hashes and plaintext passwrod from + * Also wipes the LM and NT hashes and plaintext password from * memory. * * @param user SAM_ACCOUNT to free members of. @@ -473,7 +473,7 @@ BOOL pdb_gethexpwd(const char *p, unsigned char *pwd) { int i; unsigned char lonybble, hinybble; - char *hexchars = "0123456789ABCDEF"; + const char *hexchars = "0123456789ABCDEF"; char *p1, *p2; if (!p) diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 891a29148f..778cb9425c 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -25,8 +25,8 @@ #define DBGC_CLASS DBGC_PASSDB /** List of various built-in passdb modules */ -const struct { - char *name; +static const struct { + const char *name; /* Function to create a member of the pdb_methods list */ pdb_init_function init; } builtin_pdb_init_functions[] = { @@ -58,7 +58,7 @@ static void lazy_initialize_passdb() } } -BOOL smb_register_passdb(char *name, pdb_init_function init, int version) +BOOL smb_register_passdb(const char *name, pdb_init_function init, int version) { struct pdb_init_function_entry *entry = backends; diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 884db4c26c..7c3c6f1f1f 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -728,7 +728,7 @@ static int ldapsam_search_one_user_by_rid (struct ldapsam_privates *ldap_state, search an attribute and return the first value found. ******************************************************************/ static BOOL get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry, - char *attribute, pstring value) + const char *attribute, pstring value) { char **values; diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 2aa2e504d7..a1f786c8cd 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -529,7 +529,7 @@ static NTSTATUS tdbsam_getsampwent(struct pdb_methods *my_methods, SAM_ACCOUNT * NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; struct tdbsam_privates *tdb_state = (struct tdbsam_privates *)my_methods->private_data; TDB_DATA data; - char *prefix = USERPREFIX; + const char *prefix = USERPREFIX; int prefixlen = strlen (prefix); diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index b93ea74d8b..d30b13c3b6 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -324,7 +324,7 @@ BOOL secrets_store_trust_account_password(const char *domain, uint8 new_pwd[16]) **/ BOOL secrets_store_trusted_domain_password(const char* domain, smb_ucs2_t *uni_dom_name, - size_t uni_name_len, char* pwd, + size_t uni_name_len, const char* pwd, DOM_SID sid) { struct trusted_dom_pass pass; diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c index 0881531db8..6a7675a12a 100644 --- a/source3/passdb/util_sam_sid.c +++ b/source3/passdb/util_sam_sid.c @@ -27,14 +27,14 @@ typedef struct _known_sid_users { uint32 rid; enum SID_NAME_USE sid_name_use; - char *known_user_name; + const char *known_user_name; } known_sid_users; static struct sid_name_map_info { DOM_SID *sid; - char *name; - known_sid_users *known_users; + const char *name; + const known_sid_users *known_users; } sid_name_map[MAX_SID_NAMES]; extern DOM_SID global_sid_Builtin; /* Local well-known domain */ @@ -46,16 +46,16 @@ extern DOM_SID global_sid_NT_Authority; /* NT Authority */ static BOOL sid_name_map_initialized = False; /* static known_sid_users no_users[] = {{0, 0, NULL}}; */ -static known_sid_users everyone_users[] = { +static const known_sid_users everyone_users[] = { { 0, SID_NAME_WKN_GRP, "Everyone" }, {0, (enum SID_NAME_USE)0, NULL}}; -static known_sid_users creator_owner_users[] = { +static const known_sid_users creator_owner_users[] = { { 0, SID_NAME_WKN_GRP, "Creator Owner" }, { 1, SID_NAME_WKN_GRP, "Creator Group" }, {0, (enum SID_NAME_USE)0, NULL}}; -static known_sid_users nt_authority_users[] = { +static const known_sid_users nt_authority_users[] = { { 1, SID_NAME_ALIAS, "Dialup" }, { 2, SID_NAME_ALIAS, "Network"}, { 3, SID_NAME_ALIAS, "Batch"}, @@ -68,7 +68,7 @@ static known_sid_users nt_authority_users[] = { { 18, SID_NAME_ALIAS, "SYSTEM"}, { 0, (enum SID_NAME_USE)0, NULL}}; -static known_sid_users builtin_groups[] = { +static const known_sid_users builtin_groups[] = { { BUILTIN_ALIAS_RID_ADMINS, SID_NAME_ALIAS, "Administrators" }, { BUILTIN_ALIAS_RID_USERS, SID_NAME_ALIAS, "Users" }, { BUILTIN_ALIAS_RID_GUESTS, SID_NAME_ALIAS, "Guests" }, @@ -284,7 +284,7 @@ BOOL map_name_to_wellknown_sid(DOM_SID *sid, enum SID_NAME_USE *use, const char init_sid_name_map(); for (i=0; sid_name_map[i].sid != NULL; i++) { - known_sid_users *users = sid_name_map[i].known_users; + const known_sid_users *users = sid_name_map[i].known_users; if (users == NULL) continue; diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c index 59a844689c..4b91b8ac9a 100644 --- a/source3/printing/lpq_parse.c +++ b/source3/printing/lpq_parse.c @@ -20,7 +20,7 @@ #include "includes.h" -static char *Months[13] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", +static const char *Months[13] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Err"}; @@ -947,9 +947,9 @@ static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first) return(True); } -static char *stat0_strings[] = { "enabled", "online", "idle", "no entries", "free", "ready", NULL }; -static char *stat1_strings[] = { "offline", "disabled", "down", "off", "waiting", "no daemon", NULL }; -static char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", "turned off", NULL }; +static const char *stat0_strings[] = { "enabled", "online", "idle", "no entries", "free", "ready", NULL }; +static const char *stat1_strings[] = { "offline", "disabled", "down", "off", "waiting", "no daemon", NULL }; +static const char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", "turned off", NULL }; #ifdef DEVELOPER diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 31f480a4dd..f04992ac82 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -77,7 +77,7 @@ STANDARD_MAPPING printserver_std_mapping = { forms it wants and in the ORDER it wants them (note: DEVMODE papersize is an array index). Letter is always first, so (for the current code) additions always put things in the correct order. */ -static nt_forms_struct default_forms[] = { +static const nt_forms_struct default_forms[] = { {"Letter",0x1,0x34b5c,0x44368,0x0,0x0,0x34b5c,0x44368}, {"Letter Small",0x1,0x34b5c,0x44368,0x0,0x0,0x34b5c,0x44368}, {"Tabloid",0x1,0x44368,0x696b8,0x0,0x0,0x44368,0x696b8}, @@ -264,7 +264,7 @@ static BOOL upgrade_to_version_3(void) BOOL nt_printing_init(void) { static pid_t local_pid; - char *vstring = "INFO/version"; + const char *vstring = "INFO/version"; if (tdb_drivers && tdb_printers && tdb_forms && local_pid == sys_getpid()) return True; @@ -635,7 +635,7 @@ get the nt drivers list traverse the database and look-up the matching names ****************************************************************************/ -int get_ntdrivers(fstring **list, char *architecture, uint32 version) +int get_ntdrivers(fstring **list, const char *architecture, uint32 version) { int total=0; fstring short_archi; @@ -668,11 +668,11 @@ int get_ntdrivers(fstring **list, char *architecture, uint32 version) function to do the mapping between the long architecture name and the short one. ****************************************************************************/ -BOOL get_short_archi(char *short_archi, char *long_archi) +BOOL get_short_archi(char *short_archi, const char *long_archi) { struct table { - char *long_archi; - char *short_archi; + const char *long_archi; + const char *short_archi; }; struct table archi_table[]= @@ -1714,7 +1714,7 @@ static uint32 add_a_printer_driver_6(NT_PRINTER_DRIVER_INFO_LEVEL_6 *driver) /**************************************************************************** ****************************************************************************/ -static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, fstring driver, fstring arch) +static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, const char *driver, const char *arch) { NT_PRINTER_DRIVER_INFO_LEVEL_3 info; @@ -1741,7 +1741,7 @@ static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in /**************************************************************************** ****************************************************************************/ -static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, fstring drivername, fstring arch, uint32 version) +static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, fstring drivername, const char *arch, uint32 version) { NT_PRINTER_DRIVER_INFO_LEVEL_3 driver; TDB_DATA kbuf, dbuf; @@ -2314,7 +2314,7 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, char *buf, int buflen) allocate and initialize a new slot in ***************************************************************************/ -static int add_new_printer_key( NT_PRINTER_DATA *data, char *name ) +static int add_new_printer_key( NT_PRINTER_DATA *data, const char *name ) { NT_PRINTER_KEY *d; int key_index; @@ -2348,7 +2348,7 @@ static int add_new_printer_key( NT_PRINTER_DATA *data, char *name ) search for a registry key name in the existing printer data ***************************************************************************/ -int lookup_printerkey( NT_PRINTER_DATA *data, char *name ) +int lookup_printerkey( NT_PRINTER_DATA *data, const char *name ) { int key_index = -1; int i; @@ -2376,7 +2376,7 @@ int lookup_printerkey( NT_PRINTER_DATA *data, char *name ) /**************************************************************************** ***************************************************************************/ -uint32 get_printer_subkeys( NT_PRINTER_DATA *data, char* key, fstring **subkeys ) +uint32 get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subkeys ) { int i, j; int key_len; @@ -2505,7 +2505,8 @@ static BOOL map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2) { REGVAL_CTR *ctr = NULL; fstring longname; - char *ascii_str; + char *allocated_string = NULL; + const char *ascii_str; int i; if ((i = lookup_printerkey(&info2->data, SPOOL_DSSPOOLER_KEY)) < 0) @@ -2518,10 +2519,9 @@ static BOOL map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2) get_myfullname(longname); map_sz_into_ctr(ctr, SPOOL_REG_SERVERNAME, longname); - asprintf(&ascii_str, "\\\\%s\\%s", longname, info2->sharename); - map_sz_into_ctr(ctr, SPOOL_REG_UNCNAME, ascii_str); - safe_free(ascii_str); - + asprintf(&allocated_string, "\\\\%s\\%s", longname, info2->sharename); + map_sz_into_ctr(ctr, SPOOL_REG_UNCNAME, allocated_string); + SAFE_FREE(allocated_string); map_dword_into_ctr(ctr, SPOOL_REG_VERSIONNUMBER, 4); map_sz_into_ctr(ctr, SPOOL_REG_DRIVERNAME, info2->drivername); @@ -2760,7 +2760,7 @@ BOOL is_printer_published(int snum, GUID *guid) /**************************************************************************** ***************************************************************************/ -WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key ) +WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key ) { NT_PRINTER_DATA *data; int i; @@ -2858,7 +2858,7 @@ WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key ) /**************************************************************************** ***************************************************************************/ -WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value ) +WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value ) { WERROR result = WERR_OK; int key_index; @@ -2885,7 +2885,7 @@ WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value /**************************************************************************** ***************************************************************************/ -WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value, +WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value, uint32 type, uint8 *data, int real_len ) { WERROR result = WERR_OK; @@ -2917,7 +2917,7 @@ WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value, /**************************************************************************** ***************************************************************************/ -REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value ) +REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value ) { int key_index; @@ -3901,7 +3901,7 @@ uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level) /**************************************************************************** ****************************************************************************/ WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level, - fstring drivername, fstring architecture, uint32 version) + fstring drivername, const char *architecture, uint32 version) { WERROR result; diff --git a/source3/printing/printing.c b/source3/printing/printing.c index cde1646107..711d99f394 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -165,7 +165,7 @@ static int get_queue_status(int, print_status_struct *); BOOL print_backend_init(void) { - char *sversion = "INFO/version"; + const char *sversion = "INFO/version"; pstring printing_path; int services = lp_numservices(); int snum; @@ -1291,10 +1291,10 @@ BOOL print_job_delete(struct current_user *user, int snum, uint32 jobid, WERROR *errcode = WERR_ACCESS_DENIED; /* BEGIN_ADMIN_LOG */ - sys_adminlog( LOG_ERR, (char *) - "Permission denied-- user not allowed to delete, \ + sys_adminlog( LOG_ERR, + "Permission denied-- user not allowed to delete, \ pause, or resume print job. User name: %s. Printer name: %s.", - uidtoname(user->uid), PRINTERNAME(snum) ); + uidtoname(user->uid), PRINTERNAME(snum) ); /* END_ADMIN_LOG */ return False; @@ -1356,7 +1356,7 @@ BOOL print_job_pause(struct current_user *user, int snum, uint32 jobid, WERROR * DEBUG(3, ("pause denied by security descriptor\n")); /* BEGIN_ADMIN_LOG */ - sys_adminlog( LOG_ERR, (char *) + sys_adminlog( LOG_ERR, "Permission denied-- user not allowed to delete, \ pause, or resume print job. User name: %s. Printer name: %s.", uidtoname(user->uid), PRINTERNAME(snum) ); @@ -1407,7 +1407,7 @@ BOOL print_job_resume(struct current_user *user, int snum, uint32 jobid, WERROR *errcode = WERR_ACCESS_DENIED; /* BEGIN_ADMIN_LOG */ - sys_adminlog( LOG_ERR, (char *) + sys_adminlog( LOG_ERR, "Permission denied-- user not allowed to delete, \ pause, or resume print job. User name: %s. Printer name: %s.", uidtoname(user->uid), PRINTERNAME(snum) ); diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index 3289ebfe88..9cfeb7faa9 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -40,7 +40,7 @@ void regsubkey_ctr_init( REGSUBKEY_CTR *ctr ) Add a new key to the array **********************************************************************/ -int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, char *keyname ) +int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname ) { uint32 len; char **pp; @@ -345,7 +345,7 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name ) No need to free memory since it is talloc'd. **********************************************************************/ -REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, char *name ) +REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name ) { int i; diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index a58a91a0a8..4b8eaa658e 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -84,7 +84,7 @@ static char* trim_reg_path( char *path ) static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys ) { - char *environments[] = { + const char *environments[] = { "Windows 4.0", "Windows NT x86", "Windows NT R4000", diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 632dd30c3a..0b9f425bdc 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1006,7 +1006,7 @@ int get_pipe_index( const char *pipe_name ) check the rpc bind acknowledge response ****************************************************************************/ -char* get_pipe_name_from_index( const int pipe_index ) +const char* get_pipe_name_from_index( const int pipe_index ) { if ( (pipe_index < 0) || (pipe_index >= PI_MAX_PIPES) ) diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 15a3db389e..0a168d93ba 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -275,8 +275,8 @@ static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, ********************************************************************************/ WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *printername, char *datatype, uint32 access_required, - char *station, char *username, POLICY_HND *pol) + const char *printername, const char *datatype, uint32 access_required, + const char *station, const char *username, POLICY_HND *pol) { prs_struct qbuf, rbuf; SPOOL_Q_OPEN_PRINTER_EX q; @@ -720,7 +720,7 @@ WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, POLICY_HND *pol, uint32 level, - char *env, PRINTER_DRIVER_CTR *ctr) + const char *env, PRINTER_DRIVER_CTR *ctr) { prs_struct qbuf, rbuf; SPOOL_Q_GETPRINTERDRIVER2 q; @@ -799,7 +799,7 @@ WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - uint32 level, char *env, + uint32 level, const char *env, uint32 *num_drivers, PRINTER_DRIVER_CTR *ctr) { @@ -1067,8 +1067,8 @@ WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, * the driver files */ WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli, - TALLOC_CTX *mem_ctx, char *arch, - char *driver) + TALLOC_CTX *mem_ctx, const char *arch, + const char *driver) { prs_struct qbuf, rbuf; SPOOL_Q_DELETEPRINTERDRIVER q; @@ -2163,7 +2163,7 @@ WERROR cli_spoolss_enumprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, WERROR cli_spoolss_enumprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - POLICY_HND *hnd, char *keyname, + POLICY_HND *hnd, const char *keyname, REGVAL_CTR *ctr) { prs_struct qbuf, rbuf; @@ -2364,7 +2364,7 @@ WERROR cli_spoolss_deleteprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ct WERROR cli_spoolss_enumprinterkey(struct cli_state *cli, TALLOC_CTX *mem_ctx, uint32 offered, uint32 *needed, - POLICY_HND *hnd, char *keyname, + POLICY_HND *hnd, const char *keyname, uint16 **keylist, uint32 *len) { prs_struct qbuf, rbuf; diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c index 38633ac0f7..ccd6d429fa 100644 --- a/source3/rpc_parse/parse_dfs.c +++ b/source3/rpc_parse/parse_dfs.c @@ -41,7 +41,7 @@ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d) Read/write a DFS_Q_DFS_EXIST structure - dummy... ************************************************************/ -BOOL dfs_io_q_dfs_exist(char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth) +BOOL dfs_io_q_dfs_exist(const char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth) { if(q_d == NULL) return False; @@ -55,7 +55,7 @@ BOOL dfs_io_q_dfs_exist(char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int de Read/write a DFS_R_DFS_EXIST structure ************************************************************/ -BOOL dfs_io_r_dfs_exist(char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int depth) +BOOL dfs_io_r_dfs_exist(const char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int depth) { if(q_d == NULL) return False; @@ -91,7 +91,7 @@ BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, char *entrypath, Read/write a DFS_Q_DFS_REMOVE structure *******************************************************************/ -BOOL dfs_io_q_dfs_remove(char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth) +BOOL dfs_io_q_dfs_remove(const char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth) { if(q_d == NULL) return False; @@ -131,7 +131,7 @@ BOOL dfs_io_q_dfs_remove(char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int Read/write a DFS_R_DFS_REMOVE structure *******************************************************************/ -BOOL dfs_io_r_dfs_remove(char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int depth) +BOOL dfs_io_r_dfs_remove(const char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int depth) { if(r_d == NULL) return False; @@ -172,7 +172,7 @@ BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, char *entrypath, char *servername, Read/write a DFS_Q_DFS_ADD structure ************************************************************/ -BOOL dfs_io_q_dfs_add(char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth) +BOOL dfs_io_q_dfs_add(const char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth) { if(q_d == NULL) return False; @@ -217,7 +217,7 @@ BOOL dfs_io_q_dfs_add(char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth) Read/write a DFS_R_DFS_ADD structure ************************************************************/ -BOOL dfs_io_r_dfs_add(char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth) +BOOL dfs_io_r_dfs_add(const char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth) { if(r_d == NULL) return False; @@ -248,7 +248,7 @@ BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, char *entrypath, Read/write a DFS_Q_GET_INFO structure ************************************************************/ -BOOL dfs_io_q_dfs_get_info(char* desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth) +BOOL dfs_io_q_dfs_get_info(const char *desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth) { if(q_i == NULL) return False; @@ -288,7 +288,7 @@ BOOL dfs_io_q_dfs_get_info(char* desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, Read/write a DFS_R_GET_INFO structure ************************************************************/ -BOOL dfs_io_r_dfs_get_info(char* desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, int depth) +BOOL dfs_io_r_dfs_get_info(const char *desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, int depth) { if(r_i == NULL) return False; @@ -327,7 +327,7 @@ BOOL init_dfs_q_dfs_enum(DFS_Q_DFS_ENUM *q_d, uint32 level, DFS_INFO_CTR *ctr) Read or write the DFS_Q_DFS_ENUM structure ************************************************************/ -BOOL dfs_io_q_dfs_enum(char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int depth) +BOOL dfs_io_q_dfs_enum(const char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int depth) { if(q_d == NULL) return False; @@ -364,7 +364,7 @@ BOOL dfs_io_q_dfs_enum(char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int dept Read/write a DFS_INFO_CTR structure ************************************************************/ -BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint32 level, prs_struct* ps, int depth) +BOOL dfs_io_dfs_info_ctr(const char *desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint32 level, prs_struct* ps, int depth) { int i=0; @@ -464,7 +464,7 @@ BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint Read/write a DFS_R_DFS_ENUM structure ************************************************************/ -BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth) +BOOL dfs_io_r_dfs_enum(const char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth) { DFS_INFO_CTR *ctr; if(q_d == NULL) @@ -506,7 +506,7 @@ BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int dept return True; } -BOOL dfs_io_dfs_storage_info(char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth) +BOOL dfs_io_dfs_storage_info(const char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth) { int i=0; if(info3 == NULL) diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c index 3c70cabc71..ab07631831 100644 --- a/source3/rpc_parse/parse_ds.c +++ b/source3/rpc_parse/parse_ds.c @@ -20,7 +20,7 @@ #include "includes.h" -static BOOL ds_io_dominfobasic( char *desc, prs_struct *ps, int depth, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic) +static BOOL ds_io_dominfobasic( const char *desc, prs_struct *ps, int depth, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic) { DSROLE_PRIMARY_DOMAIN_INFO_BASIC *p = *basic; @@ -68,7 +68,7 @@ static BOOL ds_io_dominfobasic( char *desc, prs_struct *ps, int depth, DSROLE_PR } -BOOL ds_io_q_getprimdominfo( char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth) +BOOL ds_io_q_getprimdominfo( const char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "ds_io_q_getprimdominfo"); depth++; @@ -82,7 +82,7 @@ BOOL ds_io_q_getprimdominfo( char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *p return True; } -BOOL ds_io_r_getprimdominfo( char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth) +BOOL ds_io_r_getprimdominfo( const char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "ds_io_r_getprimdominfo"); depth++; diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 375bbd31d7..56398e7cf0 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -27,14 +27,14 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_PARSE -static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth); +static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth); /******************************************************************* Inits a LSA_TRANS_NAME structure. ********************************************************************/ void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name, - uint16 sid_name_use, char *name, uint32 idx) + uint16 sid_name_use, const char *name, uint32 idx) { int len_name = strlen(name); @@ -51,7 +51,7 @@ void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name, Reads or writes a LSA_TRANS_NAME structure. ********************************************************************/ -static BOOL lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps, +static BOOL lsa_io_trans_name(const char *desc, LSA_TRANS_NAME *trn, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_trans_name"); @@ -77,7 +77,7 @@ static BOOL lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps, Reads or writes a DOM_R_REF structure. ********************************************************************/ -static BOOL lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, +static BOOL lsa_io_dom_r_ref(const char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth) { int i; @@ -156,7 +156,7 @@ void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff) Reads or writes an LSA_SEC_QOS structure. ********************************************************************/ -static BOOL lsa_io_sec_qos(char *desc, LSA_SEC_QOS *qos, prs_struct *ps, +static BOOL lsa_io_sec_qos(const char *desc, LSA_SEC_QOS *qos, prs_struct *ps, int depth) { uint32 start; @@ -216,7 +216,7 @@ static void init_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, LSA_SEC_QOS Reads or writes an LSA_OBJ_ATTR structure. ********************************************************************/ -static BOOL lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, +static BOOL lsa_io_obj_attr(const char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, int depth) { uint32 start; @@ -290,7 +290,7 @@ void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name, Reads or writes an LSA_Q_OPEN_POL structure. ********************************************************************/ -BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, +BOOL lsa_io_q_open_pol(const char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_open_pol"); @@ -316,7 +316,7 @@ BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, Reads or writes an LSA_R_OPEN_POL structure. ********************************************************************/ -BOOL lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, +BOOL lsa_io_r_open_pol(const char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_open_pol"); @@ -335,7 +335,7 @@ BOOL lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, Inits an LSA_Q_OPEN_POL2 structure. ********************************************************************/ -void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name, +void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, const char *server_name, uint32 attributes, uint32 desired_access, LSA_SEC_QOS *qos) { @@ -356,7 +356,7 @@ void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name, Reads or writes an LSA_Q_OPEN_POL2 structure. ********************************************************************/ -BOOL lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps, +BOOL lsa_io_q_open_pol2(const char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_open_pol2"); @@ -380,7 +380,7 @@ BOOL lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps, Reads or writes an LSA_R_OPEN_POL2 structure. ********************************************************************/ -BOOL lsa_io_r_open_pol2(char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps, +BOOL lsa_io_r_open_pol2(const char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_open_pol2"); @@ -414,7 +414,7 @@ void init_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ *q_q, const POLICY_HND *hnd, Reads or writes an LSA_Q_QUERY_SEC_OBJ structure. ********************************************************************/ -BOOL lsa_io_q_query_sec_obj(char *desc, LSA_Q_QUERY_SEC_OBJ *q_q, +BOOL lsa_io_q_query_sec_obj(const char *desc, LSA_Q_QUERY_SEC_OBJ *q_q, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_query_sec_obj"); @@ -433,7 +433,7 @@ BOOL lsa_io_q_query_sec_obj(char *desc, LSA_Q_QUERY_SEC_OBJ *q_q, Reads or writes a LSA_R_QUERY_SEC_OBJ structure. ********************************************************************/ -BOOL lsa_io_r_query_sec_obj(char *desc, LSA_R_QUERY_SEC_OBJ *r_u, +BOOL lsa_io_r_query_sec_obj(const char *desc, LSA_R_QUERY_SEC_OBJ *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_query_sec_obj"); @@ -473,7 +473,7 @@ void init_q_query(LSA_Q_QUERY_INFO *q_q, POLICY_HND *hnd, uint16 info_class) Reads or writes an LSA_Q_QUERY_INFO structure. ********************************************************************/ -BOOL lsa_io_q_query(char *desc, LSA_Q_QUERY_INFO *q_q, prs_struct *ps, +BOOL lsa_io_q_query(const char *desc, LSA_Q_QUERY_INFO *q_q, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_query"); @@ -507,7 +507,7 @@ BOOL init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM * q_e, POLICY_HND *pol, Reads or writes an LSA_Q_ENUM_TRUST_DOM structure. ********************************************************************/ -BOOL lsa_io_q_enum_trust_dom(char *desc, LSA_Q_ENUM_TRUST_DOM *q_e, +BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_enum_trust_dom"); @@ -580,7 +580,7 @@ void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 en Reads or writes an LSA_R_ENUM_TRUST_DOM structure. ********************************************************************/ -BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, +BOOL lsa_io_r_enum_trust_dom(const char *desc, LSA_R_ENUM_TRUST_DOM *r_e, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_enum_trust_dom"); @@ -639,7 +639,7 @@ BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, reads or writes a dom query structure. ********************************************************************/ -static BOOL lsa_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth) +static BOOL lsa_io_dom_query(const char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth) { if (d_q == NULL) return False; @@ -680,7 +680,7 @@ static BOOL lsa_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int dep reads or writes a structure. ********************************************************************/ -static BOOL lsa_io_dom_query_2(char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int depth) +static BOOL lsa_io_dom_query_2(const char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int depth) { uint32 ptr = 1; @@ -721,7 +721,7 @@ static BOOL lsa_io_dom_query_2(char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int Reads or writes a dom query structure. ********************************************************************/ -static BOOL lsa_io_dom_query_3(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth) +static BOOL lsa_io_dom_query_3(const char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth) { return lsa_io_dom_query("", d_q, ps, depth); } @@ -730,7 +730,7 @@ static BOOL lsa_io_dom_query_3(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int Reads or writes a dom query structure. ********************************************************************/ -static BOOL lsa_io_dom_query_5(char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth) +static BOOL lsa_io_dom_query_5(const char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth) { return lsa_io_dom_query("", d_q, ps, depth); } @@ -739,7 +739,7 @@ static BOOL lsa_io_dom_query_5(char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int Reads or writes a dom query structure. ********************************************************************/ -static BOOL lsa_io_dom_query_6(char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int depth) +static BOOL lsa_io_dom_query_6(const char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int depth) { if (d_q == NULL) return False; @@ -757,7 +757,7 @@ static BOOL lsa_io_dom_query_6(char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int Reads or writes an LSA_R_QUERY_INFO structure. ********************************************************************/ -BOOL lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, +BOOL lsa_io_r_query(const char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_query"); @@ -848,7 +848,7 @@ static void init_lsa_sid_enum(TALLOC_CTX *mem_ctx, LSA_SID_ENUM *sen, Reads or writes a LSA_SID_ENUM structure. ********************************************************************/ -static BOOL lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps, +static BOOL lsa_io_sid_enum(const char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth) { int i; @@ -936,7 +936,7 @@ void init_q_lookup_sids(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_SIDS *q_l, Reads or writes a LSA_Q_LOOKUP_SIDS structure. ********************************************************************/ -BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, +BOOL lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_lookup_sids"); @@ -964,7 +964,7 @@ BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, Reads or writes a structure. ********************************************************************/ -static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, +static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth) { int i; @@ -1025,7 +1025,7 @@ static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, Reads or writes a structure. ********************************************************************/ -BOOL lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s, +BOOL lsa_io_r_lookup_sids(const char *desc, LSA_R_LOOKUP_SIDS *r_s, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_lookup_sids"); @@ -1099,7 +1099,7 @@ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, reads or writes a structure. ********************************************************************/ -BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r, +BOOL lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r, prs_struct *ps, int depth) { int i; @@ -1163,7 +1163,7 @@ BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r, reads or writes a structure. ********************************************************************/ -BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r, +BOOL lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *r_r, prs_struct *ps, int depth) { int i; @@ -1233,7 +1233,7 @@ void init_lsa_q_close(LSA_Q_CLOSE *q_c, POLICY_HND *hnd) Reads or writes an LSA_Q_CLOSE structure. ********************************************************************/ -BOOL lsa_io_q_close(char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth) +BOOL lsa_io_q_close(const char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_close"); depth++; @@ -1248,7 +1248,7 @@ BOOL lsa_io_q_close(char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth) Reads or writes an LSA_R_CLOSE structure. ********************************************************************/ -BOOL lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_close(const char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_close"); depth++; @@ -1266,7 +1266,7 @@ BOOL lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth) Reads or writes an LSA_Q_OPEN_SECRET structure. ********************************************************************/ -BOOL lsa_io_q_open_secret(char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, int depth) +BOOL lsa_io_q_open_secret(const char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_open_secret"); depth++; @@ -1279,7 +1279,7 @@ BOOL lsa_io_q_open_secret(char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, in Reads or writes an LSA_R_OPEN_SECRET structure. ********************************************************************/ -BOOL lsa_io_r_open_secret(char *desc, LSA_R_OPEN_SECRET *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_open_secret(const char *desc, LSA_R_OPEN_SECRET *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_open_secret"); depth++; @@ -1318,7 +1318,7 @@ void init_q_enum_privs(LSA_Q_ENUM_PRIVS *q_q, POLICY_HND *hnd, uint32 enum_conte /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL lsa_io_q_enum_privs(char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int depth) +BOOL lsa_io_q_enum_privs(const char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1340,7 +1340,7 @@ BOOL lsa_io_q_enum_privs(char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL lsa_io_priv_entries(char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth) +static BOOL lsa_io_priv_entries(const char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth) { uint32 i; @@ -1395,7 +1395,7 @@ void init_lsa_r_enum_privs(LSA_R_ENUM_PRIVS *r_u, uint32 enum_context, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL lsa_io_r_enum_privs(char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int depth) +BOOL lsa_io_r_enum_privs(const char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1434,7 +1434,7 @@ BOOL lsa_io_r_enum_privs(char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int return True; } -void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, char *name, uint16 lang_id, uint16 lang_id_sys) +void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, const char *name, uint16 lang_id, uint16 lang_id_sys) { int len_name = strlen(name); @@ -1452,7 +1452,7 @@ void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, c /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL lsa_io_q_priv_get_dispname(char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_struct *ps, int depth) +BOOL lsa_io_q_priv_get_dispname(const char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1483,7 +1483,7 @@ BOOL lsa_io_q_priv_get_dispname(char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_st /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL lsa_io_r_priv_get_dispname(char *desc, LSA_R_PRIV_GET_DISPNAME *r_q, prs_struct *ps, int depth) +BOOL lsa_io_r_priv_get_dispname(const char *desc, LSA_R_PRIV_GET_DISPNAME *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1530,7 +1530,7 @@ void init_lsa_q_enum_accounts(LSA_Q_ENUM_ACCOUNTS *trn, POLICY_HND *hnd, uint32 /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL lsa_io_q_enum_accounts(char *desc, LSA_Q_ENUM_ACCOUNTS *q_q, prs_struct *ps, int depth) +BOOL lsa_io_q_enum_accounts(const char *desc, LSA_Q_ENUM_ACCOUNTS *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1572,7 +1572,7 @@ void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS *r_u, uint32 enum_context) /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth) +BOOL lsa_io_r_enum_accounts(const char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1603,7 +1603,7 @@ BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps Reads or writes an LSA_Q_UNK_GET_CONNUSER structure. ********************************************************************/ -BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth) +BOOL lsa_io_q_unk_get_connuser(const char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_unk_get_connuser"); depth++; @@ -1635,7 +1635,7 @@ BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_stru Reads or writes an LSA_R_UNK_GET_CONNUSER structure. ********************************************************************/ -BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_unk_get_connuser(const char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_unk_get_connuser"); depth++; @@ -1684,7 +1684,7 @@ void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *s Reads or writes an LSA_Q_OPENACCOUNT structure. ********************************************************************/ -BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_open_account(const char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_open_account"); depth++; @@ -1708,7 +1708,7 @@ BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, i Reads or writes an LSA_R_OPENACCOUNT structure. ********************************************************************/ -BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_open_account(const char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_open_account"); depth++; @@ -1736,7 +1736,7 @@ void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd) Reads or writes an LSA_Q_ENUMPRIVSACCOUNT structure. ********************************************************************/ -BOOL lsa_io_q_enum_privsaccount(char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_enum_privsaccount(const char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_enum_privsaccount"); depth++; @@ -1754,7 +1754,7 @@ BOOL lsa_io_q_enum_privsaccount(char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_str Reads or writes an LUID structure. ********************************************************************/ -static BOOL lsa_io_luid(char *desc, LUID *r_c, prs_struct *ps, int depth) +static BOOL lsa_io_luid(const char *desc, LUID *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_luid"); depth++; @@ -1775,7 +1775,7 @@ static BOOL lsa_io_luid(char *desc, LUID *r_c, prs_struct *ps, int depth) Reads or writes an LUID_ATTR structure. ********************************************************************/ -static BOOL lsa_io_luid_attr(char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth) +static BOOL lsa_io_luid_attr(const char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_luid_attr"); depth++; @@ -1796,7 +1796,7 @@ static BOOL lsa_io_luid_attr(char *desc, LUID_ATTR *r_c, prs_struct *ps, int dep Reads or writes an PRIVILEGE_SET structure. ********************************************************************/ -static BOOL lsa_io_privilege_set(char *desc, PRIVILEGE_SET *r_c, prs_struct *ps, int depth) +static BOOL lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *r_c, prs_struct *ps, int depth) { uint32 i; @@ -1833,7 +1833,7 @@ void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, u Reads or writes an LSA_R_ENUMPRIVSACCOUNT structure. ********************************************************************/ -BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_enum_privsaccount(const char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_enum_privsaccount"); depth++; @@ -1872,7 +1872,7 @@ BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_str Reads or writes an LSA_Q_GETSYSTEMACCOUNTstructure. ********************************************************************/ -BOOL lsa_io_q_getsystemaccount(char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_getsystemaccount(const char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_getsystemaccount"); depth++; @@ -1890,7 +1890,7 @@ BOOL lsa_io_q_getsystemaccount(char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_str Reads or writes an LSA_R_GETSYSTEMACCOUNTstructure. ********************************************************************/ -BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_getsystemaccount(const char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_getsystemaccount"); depth++; @@ -1912,7 +1912,7 @@ BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_str Reads or writes an LSA_Q_SETSYSTEMACCOUNT structure. ********************************************************************/ -BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_setsystemaccount(const char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_setsystemaccount"); depth++; @@ -1933,7 +1933,7 @@ BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_str Reads or writes an LSA_R_SETSYSTEMACCOUNT structure. ********************************************************************/ -BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_setsystemaccount(const char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_setsystemaccount"); depth++; @@ -1948,7 +1948,7 @@ BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_str } -void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, char *name) +void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, const char *name) { int len_name = strlen(name); memcpy(&trn->pol, hnd, sizeof(trn->pol)); @@ -1964,7 +1964,7 @@ void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, cha Reads or writes an LSA_Q_LOOKUPPRIVVALUE structure. ********************************************************************/ -BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_lookupprivvalue(const char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_lookupprivvalue"); depth++; @@ -1986,7 +1986,7 @@ BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struc Reads or writes an LSA_R_LOOKUPPRIVVALUE structure. ********************************************************************/ -BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_lookupprivvalue(const char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_lookupprivvalue"); depth++; @@ -2008,7 +2008,7 @@ BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struc Reads or writes an LSA_Q_ADDPRIVS structure. ********************************************************************/ -BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_addprivs(const char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_addprivs"); depth++; @@ -2037,7 +2037,7 @@ BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int dept Reads or writes an LSA_R_ADDPRIVS structure. ********************************************************************/ -BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_addprivs(const char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_addprivs"); depth++; @@ -2055,7 +2055,7 @@ BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int dept Reads or writes an LSA_Q_REMOVEPRIVS structure. ********************************************************************/ -BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth) +BOOL lsa_io_q_removeprivs(const char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_removeprivs"); depth++; @@ -2097,7 +2097,7 @@ BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, in Reads or writes an LSA_R_REMOVEPRIVS structure. ********************************************************************/ -BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth) +BOOL lsa_io_r_removeprivs(const char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_removeprivs"); depth++; @@ -2123,7 +2123,7 @@ BOOL policy_handle_is_valid(const POLICY_HND *hnd) Reads or writes an LSA_DNS_DOM_INFO structure. ********************************************************************/ -BOOL lsa_io_dns_dom_info(char *desc, LSA_DNS_DOM_INFO *info, +BOOL lsa_io_dns_dom_info(const char *desc, LSA_DNS_DOM_INFO *info, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_dns_dom_info"); @@ -2182,7 +2182,7 @@ void init_q_query2(LSA_Q_QUERY_INFO2 *q_q, POLICY_HND *hnd, uint16 info_class) Reads or writes an LSA_Q_QUERY_DNSDOMINFO structure. ********************************************************************/ -BOOL lsa_io_q_query_info2(char *desc, LSA_Q_QUERY_INFO2 *q_c, +BOOL lsa_io_q_query_info2(const char *desc, LSA_Q_QUERY_INFO2 *q_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_q_query_info2"); @@ -2204,7 +2204,7 @@ BOOL lsa_io_q_query_info2(char *desc, LSA_Q_QUERY_INFO2 *q_c, Reads or writes an LSA_R_QUERY_DNSDOMINFO structure. ********************************************************************/ -BOOL lsa_io_r_query_info2(char *desc, LSA_R_QUERY_INFO2 *r_c, +BOOL lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *r_c, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "lsa_io_r_query_info2"); diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 86dd85066d..a9157e29b6 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -91,7 +91,7 @@ TALLOC_CTX *get_talloc_ctx(void) Reads or writes a UTIME type. ********************************************************************/ -static BOOL smb_io_utime(char *desc, UTIME *t, prs_struct *ps, int depth) +static BOOL smb_io_utime(const char *desc, UTIME *t, prs_struct *ps, int depth) { if (t == NULL) return False; @@ -112,7 +112,7 @@ static BOOL smb_io_utime(char *desc, UTIME *t, prs_struct *ps, int depth) Reads or writes an NTTIME structure. ********************************************************************/ -BOOL smb_io_time(char *desc, NTTIME *nttime, prs_struct *ps, int depth) +BOOL smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth) { if (nttime == NULL) return False; @@ -135,7 +135,7 @@ BOOL smb_io_time(char *desc, NTTIME *nttime, prs_struct *ps, int depth) Reads or writes a LOOKUP_LEVEL structure. ********************************************************************/ -BOOL smb_io_lookup_level(char *desc, LOOKUP_LEVEL *level, prs_struct *ps, int depth) +BOOL smb_io_lookup_level(const char *desc, LOOKUP_LEVEL *level, prs_struct *ps, int depth) { if (level == NULL) return False; @@ -178,7 +178,7 @@ void init_enum_hnd(ENUM_HND *enh, uint32 hnd) Reads or writes an ENUM_HND structure. ********************************************************************/ -BOOL smb_io_enum_hnd(char *desc, ENUM_HND *hnd, prs_struct *ps, int depth) +BOOL smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth) { if (hnd == NULL) return False; @@ -204,7 +204,7 @@ BOOL smb_io_enum_hnd(char *desc, ENUM_HND *hnd, prs_struct *ps, int depth) Reads or writes a DOM_SID structure. ********************************************************************/ -BOOL smb_io_dom_sid(char *desc, DOM_SID *sid, prs_struct *ps, int depth) +BOOL smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth) { int i; @@ -301,7 +301,7 @@ void init_dom_sid2(DOM_SID2 *sid2, const DOM_SID *sid) Reads or writes a DOM_SID2 structure. ********************************************************************/ -BOOL smb_io_dom_sid2(char *desc, DOM_SID2 *sid, prs_struct *ps, int depth) +BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth) { if (sid == NULL) return False; @@ -336,7 +336,7 @@ void init_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer) Reads or writes a STRHDR structure. ********************************************************************/ -BOOL smb_io_strhdr(char *desc, STRHDR *hdr, prs_struct *ps, int depth) +BOOL smb_io_strhdr(const char *desc, STRHDR *hdr, prs_struct *ps, int depth) { if (hdr == NULL) return False; @@ -371,7 +371,7 @@ void init_uni_hdr(UNIHDR *hdr, int len) Reads or writes a UNIHDR structure. ********************************************************************/ -BOOL smb_io_unihdr(char *desc, UNIHDR *hdr, prs_struct *ps, int depth) +BOOL smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth) { if (hdr == NULL) return False; @@ -407,7 +407,7 @@ void init_buf_hdr(BUFHDR *hdr, int max_len, int len) uint16 should be stored, or gets the size if reading. ********************************************************************/ -BOOL smb_io_hdrbuf_pre(char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset) +BOOL smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset) { (*offset) = prs_offset(ps); if (ps->io) { @@ -433,7 +433,7 @@ BOOL smb_io_hdrbuf_pre(char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint3 Does nothing on reading, as that is already handled by ...._pre() ********************************************************************/ -BOOL smb_io_hdrbuf_post(char *desc, BUFHDR *hdr, prs_struct *ps, int depth, +BOOL smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 ptr_hdrbuf, uint32 max_len, uint32 len) { if (!ps->io) { @@ -458,7 +458,7 @@ BOOL smb_io_hdrbuf_post(char *desc, BUFHDR *hdr, prs_struct *ps, int depth, Reads or writes a BUFHDR structure. ********************************************************************/ -BOOL smb_io_hdrbuf(char *desc, BUFHDR *hdr, prs_struct *ps, int depth) +BOOL smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth) { if (hdr == NULL) return False; @@ -491,7 +491,7 @@ void init_uni_hdr2(UNIHDR2 *hdr, int len) Reads or writes a UNIHDR2 structure. ********************************************************************/ -BOOL smb_io_unihdr2(char *desc, UNIHDR2 *hdr2, prs_struct *ps, int depth) +BOOL smb_io_unihdr2(const char *desc, UNIHDR2 *hdr2, prs_struct *ps, int depth) { if (hdr2 == NULL) return False; @@ -542,7 +542,7 @@ reads or writes a UNISTR structure. XXXX NOTE: UNISTR structures NEED to be null-terminated. ********************************************************************/ -BOOL smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth) +BOOL smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth) { if (uni == NULL) return False; @@ -639,7 +639,7 @@ void init_buffer3_bytes(BUFFER3 *str, uint8 *buf, int len) the uni_str_len member tells you how much of the buffer is really used. ********************************************************************/ -BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth) +BOOL smb_io_buffer3(const char *desc, BUFFER3 *buf3, prs_struct *ps, int depth) { if (buf3 == NULL) return False; @@ -672,7 +672,7 @@ BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth) reads or writes a BUFFER5 structure. the buf_len member tells you how large the buffer is. ********************************************************************/ -BOOL smb_io_buffer5(char *desc, BUFFER5 *buf5, prs_struct *ps, int depth) +BOOL smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "smb_io_buffer5"); depth++; @@ -721,7 +721,7 @@ void init_buffer2(BUFFER2 *str, const uint8 *buf, int len) the uni_str_len member tells you how much of the buffer is really used. ********************************************************************/ -BOOL smb_io_buffer2(char *desc, BUFFER2 *buf2, uint32 buffer, prs_struct *ps, int depth) +BOOL smb_io_buffer2(const char *desc, BUFFER2 *buf2, uint32 buffer, prs_struct *ps, int depth) { if (buf2 == NULL) return False; @@ -844,7 +844,7 @@ void init_string2(STRING2 *str, const char *buf, int max_len, int str_len) the str_max_len member tells you how large the buffer is. ********************************************************************/ -BOOL smb_io_string2(char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth) +BOOL smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth) { if (str2 == NULL) return False; @@ -1006,7 +1006,7 @@ void init_unistr2_from_unistr (UNISTR2 *to, const UNISTR *from) the uni_max_len member tells you how large the buffer is. ********************************************************************/ -BOOL smb_io_unistr2(char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth) +BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth) { if (uni2 == NULL) return False; @@ -1057,7 +1057,7 @@ void init_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx) Reads or writes a DOM_RID2 structure. ********************************************************************/ -BOOL smb_io_dom_rid2(char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth) +BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth) { if (rid2 == NULL) return False; @@ -1097,7 +1097,7 @@ void init_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type) reads or writes a DOM_RID3 structure. ********************************************************************/ -BOOL smb_io_dom_rid3(char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth) +BOOL smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth) { if (rid3 == NULL) return False; @@ -1160,7 +1160,7 @@ static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char * Inits or writes a DOM_CLNT_SRV structure. ********************************************************************/ -static BOOL smb_io_clnt_srv(char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth) +static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth) { if (log == NULL) return False; @@ -1216,7 +1216,7 @@ void init_log_info(DOM_LOG_INFO *log, const char *logon_srv, const char *acct_na Reads or writes a DOM_LOG_INFO structure. ********************************************************************/ -BOOL smb_io_log_info(char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth) +BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth) { if (log == NULL) return False; @@ -1248,7 +1248,7 @@ BOOL smb_io_log_info(char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth) Reads or writes a DOM_CHAL structure. ********************************************************************/ -BOOL smb_io_chal(char *desc, DOM_CHAL *chal, prs_struct *ps, int depth) +BOOL smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth) { if (chal == NULL) return False; @@ -1266,7 +1266,7 @@ BOOL smb_io_chal(char *desc, DOM_CHAL *chal, prs_struct *ps, int depth) Reads or writes a DOM_CRED structure. ********************************************************************/ -BOOL smb_io_cred(char *desc, DOM_CRED *cred, prs_struct *ps, int depth) +BOOL smb_io_cred(const char *desc, DOM_CRED *cred, prs_struct *ps, int depth) { if (cred == NULL) return False; @@ -1310,7 +1310,7 @@ void init_clnt_info2(DOM_CLNT_INFO2 *clnt, Reads or writes a DOM_CLNT_INFO2 structure. ********************************************************************/ -BOOL smb_io_clnt_info2(char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth) +BOOL smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth) { if (clnt == NULL) return False; @@ -1354,7 +1354,7 @@ void init_clnt_info(DOM_CLNT_INFO *clnt, Reads or writes a DOM_CLNT_INFO structure. ********************************************************************/ -BOOL smb_io_clnt_info(char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth) +BOOL smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth) { if (clnt == NULL) return False; @@ -1389,7 +1389,7 @@ void init_logon_id(DOM_LOGON_ID *log, uint32 log_id_low, uint32 log_id_high) Reads or writes a DOM_LOGON_ID structure. ********************************************************************/ -BOOL smb_io_logon_id(char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth) +BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth) { if (log == NULL) return False; @@ -1426,7 +1426,7 @@ void init_owf_info(OWF_INFO *hash, const uint8 data[16]) Reads or writes an OWF_INFO structure. ********************************************************************/ -BOOL smb_io_owf_info(char *desc, OWF_INFO *hash, prs_struct *ps, int depth) +BOOL smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth) { if (hash == NULL) return False; @@ -1447,7 +1447,7 @@ BOOL smb_io_owf_info(char *desc, OWF_INFO *hash, prs_struct *ps, int depth) Reads or writes a DOM_GID structure. ********************************************************************/ -BOOL smb_io_gid(char *desc, DOM_GID *gid, prs_struct *ps, int depth) +BOOL smb_io_gid(const char *desc, DOM_GID *gid, prs_struct *ps, int depth) { if (gid == NULL) return False; @@ -1470,7 +1470,7 @@ BOOL smb_io_gid(char *desc, DOM_GID *gid, prs_struct *ps, int depth) Reads or writes an POLICY_HND structure. ********************************************************************/ -BOOL smb_io_pol_hnd(char *desc, POLICY_HND *pol, prs_struct *ps, int depth) +BOOL smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth) { if (pol == NULL) return False; @@ -1532,7 +1532,7 @@ void init_unistr3(UNISTR3 *str, const char *buf) Reads or writes a UNISTR3 structure. ********************************************************************/ -BOOL smb_io_unistr3(char *desc, UNISTR3 *name, prs_struct *ps, int depth) +BOOL smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth) { if (name == NULL) return False; @@ -1559,7 +1559,7 @@ BOOL smb_io_unistr3(char *desc, UNISTR3 *name, prs_struct *ps, int depth) /******************************************************************* Stream a uint64_struct ********************************************************************/ -BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64) +BOOL prs_uint64(const char *name, prs_struct *ps, int depth, UINT64_S *data64) { return prs_uint32(name, ps, depth+1, &data64->low) && prs_uint32(name, ps, depth+1, &data64->high); @@ -1568,7 +1568,7 @@ BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64) /******************************************************************* reads or writes a BUFHDR2 structure. ********************************************************************/ -BOOL smb_io_bufhdr2(char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth) +BOOL smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "smb_io_bufhdr2"); depth++; @@ -1584,7 +1584,7 @@ BOOL smb_io_bufhdr2(char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth) /******************************************************************* reads or writes a BUFFER4 structure. ********************************************************************/ -BOOL smb_io_buffer4(char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth) +BOOL smb_io_buffer4(const char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "smb_io_buffer4"); depth++; diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index c140a1fe01..ac21e6f2dd 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -30,7 +30,7 @@ Reads or writes a structure. ********************************************************************/ -static BOOL net_io_neg_flags(char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth) +static BOOL net_io_neg_flags(const char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth) { if (neg == NULL) return False; @@ -66,7 +66,7 @@ static void init_netinfo_3(NETLOGON_INFO_3 *info, uint32 flags, uint32 logon_att Reads or writes a NETLOGON_INFO_3 structure. ********************************************************************/ -static BOOL net_io_netinfo_3(char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth) +static BOOL net_io_netinfo_3(const char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth) { if (info == NULL) return False; @@ -110,7 +110,7 @@ static void init_netinfo_1(NETLOGON_INFO_1 *info, uint32 flags, uint32 pdc_statu Reads or writes a NETLOGON_INFO_1 structure. ********************************************************************/ -static BOOL net_io_netinfo_1(char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth) +static BOOL net_io_netinfo_1(const char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth) { if (info == NULL) return False; @@ -152,7 +152,7 @@ static void init_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_statu Reads or writes a NETLOGON_INFO_2 structure. ********************************************************************/ -static BOOL net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth) +static BOOL net_io_netinfo_2(const char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth) { if (info == NULL) return False; @@ -187,7 +187,7 @@ static BOOL net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, Reads or writes an NET_Q_LOGON_CTRL2 structure. ********************************************************************/ -BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth) +BOOL net_io_q_logon_ctrl2(const char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth) { if (q_l == NULL) return False; @@ -278,7 +278,7 @@ void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level, Reads or writes an NET_R_LOGON_CTRL2 structure. ********************************************************************/ -BOOL net_io_r_logon_ctrl2(char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth) +BOOL net_io_r_logon_ctrl2(const char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth) { if (r_l == NULL) return False; @@ -322,7 +322,7 @@ BOOL net_io_r_logon_ctrl2(char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, in Reads or writes an NET_Q_LOGON_CTRL structure. ********************************************************************/ -BOOL net_io_q_logon_ctrl(char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps, +BOOL net_io_q_logon_ctrl(const char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_q_logon_ctrl"); @@ -395,7 +395,7 @@ void init_net_r_logon_ctrl(NET_R_LOGON_CTRL *r_l, uint32 query_level, Reads or writes an NET_R_LOGON_CTRL structure. ********************************************************************/ -BOOL net_io_r_logon_ctrl(char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps, +BOOL net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_r_logon_ctrl"); @@ -459,7 +459,7 @@ void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t, Reads or writes an NET_R_TRUST_DOM_LIST structure. ********************************************************************/ -BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth) +BOOL net_io_r_trust_dom(const char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth) { uint32 value; @@ -511,7 +511,7 @@ BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, i Reads or writes an NET_Q_TRUST_DOM_LIST structure. ********************************************************************/ -BOOL net_io_q_trust_dom(char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth) +BOOL net_io_q_trust_dom(const char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth) { if (q_l == NULL) return False; @@ -551,7 +551,7 @@ void init_q_req_chal(NET_Q_REQ_CHAL *q_c, Reads or writes an NET_Q_REQ_CHAL structure. ********************************************************************/ -BOOL net_io_q_req_chal(char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth) +BOOL net_io_q_req_chal(const char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth) { if (q_c == NULL) return False; @@ -580,7 +580,7 @@ BOOL net_io_q_req_chal(char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int dep Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_req_chal(char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth) +BOOL net_io_r_req_chal(const char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth) { if (r_c == NULL) return False; @@ -605,7 +605,7 @@ BOOL net_io_r_req_chal(char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int dept Reads or writes a structure. ********************************************************************/ -BOOL net_io_q_auth(char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth) +BOOL net_io_q_auth(const char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth) { if (q_a == NULL) return False; @@ -628,7 +628,7 @@ BOOL net_io_q_auth(char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth) Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_auth(char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth) +BOOL net_io_r_auth(const char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth) { if (r_a == NULL) return False; @@ -669,7 +669,7 @@ void init_q_auth_2(NET_Q_AUTH_2 *q_a, Reads or writes a structure. ********************************************************************/ -BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth) +BOOL net_io_q_auth_2(const char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth) { if (q_a == NULL) return False; @@ -694,7 +694,7 @@ BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth) Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_auth_2(char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth) +BOOL net_io_r_auth_2(const char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth) { if (r_a == NULL) return False; @@ -737,7 +737,7 @@ void init_q_auth_3(NET_Q_AUTH_3 *q_a, Reads or writes a structure. ********************************************************************/ -BOOL net_io_q_auth_3(char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth) +BOOL net_io_q_auth_3(const char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth) { if (q_a == NULL) return False; @@ -762,7 +762,7 @@ BOOL net_io_q_auth_3(char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth) Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_auth_3(char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth) +BOOL net_io_r_auth_3(const char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth) { if (r_a == NULL) return False; @@ -812,7 +812,7 @@ void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s, Reads or writes a structure. ********************************************************************/ -BOOL net_io_q_srv_pwset(char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth) +BOOL net_io_q_srv_pwset(const char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth) { if (q_s == NULL) return False; @@ -835,7 +835,7 @@ BOOL net_io_q_srv_pwset(char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int de Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_srv_pwset(char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth) +BOOL net_io_r_srv_pwset(const char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth) { if (r_s == NULL) return False; @@ -967,7 +967,7 @@ void init_id_info1(NET_ID_INFO_1 *id, const char *domain_name, Reads or writes an NET_ID_INFO_1 structure. ********************************************************************/ -static BOOL net_io_id_info1(char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth) +static BOOL net_io_id_info1(const char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth) { if (id == NULL) return False; @@ -1083,7 +1083,7 @@ void init_id_info2(NET_ID_INFO_2 * id, const char *domain_name, Reads or writes an NET_ID_INFO_2 structure. ********************************************************************/ -static BOOL net_io_id_info2(char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth) +static BOOL net_io_id_info2(const char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth) { if (id == NULL) return False; @@ -1169,7 +1169,7 @@ void init_sam_info(DOM_SAM_INFO *sam, Reads or writes a DOM_SAM_INFO structure. ********************************************************************/ -static BOOL net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct *ps, int depth) +static BOOL net_io_id_info_ctr(const char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct *ps, int depth) { NET_ID_INFO_CTR *ctr = *pp_ctr; @@ -1212,7 +1212,7 @@ static BOOL net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct Reads or writes a DOM_SAM_INFO structure. ********************************************************************/ -static BOOL smb_io_sam_info(char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth) +static BOOL smb_io_sam_info(const char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth) { if (sam == NULL) return False; @@ -1544,7 +1544,7 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps, Reads or writes a structure. ********************************************************************/ -BOOL net_io_q_sam_logon(char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth) +BOOL net_io_q_sam_logon(const char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth) { if (q_l == NULL) return False; @@ -1568,7 +1568,7 @@ BOOL net_io_q_sam_logon(char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int de Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_sam_logon(char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth) +BOOL net_io_r_sam_logon(const char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth) { if (r_l == NULL) return False; @@ -1612,7 +1612,7 @@ BOOL net_io_r_sam_logon(char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int de Reads or writes a structure. ********************************************************************/ -BOOL net_io_q_sam_logoff(char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth) +BOOL net_io_q_sam_logoff(const char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth) { if (q_l == NULL) return False; @@ -1633,7 +1633,7 @@ BOOL net_io_q_sam_logoff(char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -BOOL net_io_r_sam_logoff(char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth) +BOOL net_io_r_sam_logoff(const char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth) { if (r_l == NULL) return False; @@ -1687,7 +1687,7 @@ BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL net_io_q_sam_sync(char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps, +BOOL net_io_q_sam_sync(const char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_q_sam_sync"); @@ -1719,7 +1719,7 @@ BOOL net_io_q_sam_sync(char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_delta_hdr(char *desc, SAM_DELTA_HDR * delta, +static BOOL net_io_sam_delta_hdr(const char *desc, SAM_DELTA_HDR * delta, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_sam_delta_hdr"); @@ -1749,7 +1749,7 @@ static BOOL net_io_sam_delta_hdr(char *desc, SAM_DELTA_HDR * delta, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_delta_mod_count(char *desc, SAM_DELTA_MOD_COUNT *info, +static BOOL net_io_sam_delta_mod_count(const char *desc, SAM_DELTA_MOD_COUNT *info, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_sam_delta_stamp"); @@ -1773,7 +1773,7 @@ static BOOL net_io_sam_delta_mod_count(char *desc, SAM_DELTA_MOD_COUNT *info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_domain_info(char *desc, SAM_DOMAIN_INFO * info, +static BOOL net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_sam_domain_info"); @@ -1828,7 +1828,7 @@ static BOOL net_io_sam_domain_info(char *desc, SAM_DOMAIN_INFO * info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_group_info(char *desc, SAM_GROUP_INFO * info, +static BOOL net_io_sam_group_info(const char *desc, SAM_GROUP_INFO * info, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_sam_group_info"); @@ -1863,7 +1863,7 @@ static BOOL net_io_sam_group_info(char *desc, SAM_GROUP_INFO * info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_passwd_info(char *desc, SAM_PWD * pwd, +static BOOL net_io_sam_passwd_info(const char *desc, SAM_PWD * pwd, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_sam_passwd_info"); @@ -1973,7 +1973,7 @@ BOOL make_sam_account_info(SAM_ACCOUNT_INFO * info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_account_info(char *desc, uint8 sess_key[16], +static BOOL net_io_sam_account_info(const char *desc, uint8 sess_key[16], SAM_ACCOUNT_INFO * info, prs_struct *ps, int depth) { @@ -2164,7 +2164,7 @@ static BOOL net_io_sam_account_info(char *desc, uint8 sess_key[16], /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_group_mem_info(char *desc, SAM_GROUP_MEM_INFO * info, +static BOOL net_io_sam_group_mem_info(const char *desc, SAM_GROUP_MEM_INFO * info, prs_struct *ps, int depth) { uint32 i; @@ -2248,7 +2248,7 @@ static BOOL net_io_sam_group_mem_info(char *desc, SAM_GROUP_MEM_INFO * info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_alias_info(char *desc, SAM_ALIAS_INFO * info, +static BOOL net_io_sam_alias_info(const char *desc, SAM_ALIAS_INFO * info, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_sam_alias_info"); @@ -2283,7 +2283,7 @@ static BOOL net_io_sam_alias_info(char *desc, SAM_ALIAS_INFO * info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_alias_mem_info(char *desc, SAM_ALIAS_MEM_INFO * info, +static BOOL net_io_sam_alias_mem_info(const char *desc, SAM_ALIAS_MEM_INFO * info, prs_struct *ps, int depth) { uint32 i; @@ -2356,7 +2356,7 @@ static BOOL net_io_sam_alias_mem_info(char *desc, SAM_ALIAS_MEM_INFO * info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_policy_info(char *desc, SAM_DELTA_POLICY *info, +static BOOL net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info, prs_struct *ps, int depth) { int i; @@ -2442,7 +2442,7 @@ static BOOL net_io_sam_policy_info(char *desc, SAM_DELTA_POLICY *info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_trustdoms_info(char *desc, SAM_DELTA_TRUSTDOMS *info, +static BOOL net_io_sam_trustdoms_info(const char *desc, SAM_DELTA_TRUSTDOMS *info, prs_struct *ps, int depth) { int i; @@ -2490,7 +2490,7 @@ static BOOL net_io_sam_trustdoms_info(char *desc, SAM_DELTA_TRUSTDOMS *info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_secret_info(char *desc, SAM_DELTA_SECRET *info, +static BOOL net_io_sam_secret_info(const char *desc, SAM_DELTA_SECRET *info, prs_struct *ps, int depth) { int i; @@ -2577,7 +2577,7 @@ static BOOL net_io_sam_secret_info(char *desc, SAM_DELTA_SECRET *info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_privs_info(char *desc, SAM_DELTA_PRIVS *info, +static BOOL net_io_sam_privs_info(const char *desc, SAM_DELTA_PRIVS *info, prs_struct *ps, int depth) { int i; @@ -2664,7 +2664,7 @@ static BOOL net_io_sam_privs_info(char *desc, SAM_DELTA_PRIVS *info, /******************************************************************* reads or writes a structure. ********************************************************************/ -static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16], +static BOOL net_io_sam_delta_ctr(const char *desc, uint8 sess_key[16], SAM_DELTA_CTR * delta, uint16 type, prs_struct *ps, int depth) { @@ -2746,7 +2746,7 @@ static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16], /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL net_io_r_sam_sync(char *desc, uint8 sess_key[16], +BOOL net_io_r_sam_sync(const char *desc, uint8 sess_key[16], NET_R_SAM_SYNC * r_s, prs_struct *ps, int depth) { uint32 i; @@ -2859,7 +2859,7 @@ BOOL init_net_q_sam_deltas(NET_Q_SAM_DELTAS *q_s, const char *srv_name, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL net_io_q_sam_deltas(char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps, +BOOL net_io_q_sam_deltas(const char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "net_io_q_sam_deltas"); @@ -2888,7 +2888,7 @@ BOOL net_io_q_sam_deltas(char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL net_io_r_sam_deltas(char *desc, uint8 sess_key[16], +BOOL net_io_r_sam_deltas(const char *desc, uint8 sess_key[16], NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth) { int i; diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index d4a9ec3eda..63f9527dec 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -76,7 +76,7 @@ void prs_dump_region(char *name, int v, prs_struct *ps, XXXX side-effect of this function is to increase the debug depth XXXX ********************************************************************/ -void prs_debug(prs_struct *ps, int depth, const char *desc, char *fn_name) +void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name) { DEBUG(5+depth, ("%s%06x %s %s\n", tab_depth(depth), ps->data_offset, fn_name, desc)); } @@ -539,7 +539,7 @@ void prs_force_dynamic(prs_struct *ps) Stream a uint8. ********************************************************************/ -BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8) +BOOL prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8) { char *q = prs_mem_get(ps, 1); if (q == NULL) @@ -561,7 +561,7 @@ BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8) Stream a uint16. ********************************************************************/ -BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16) +BOOL prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16) { char *q = prs_mem_get(ps, sizeof(uint16)); if (q == NULL) @@ -590,7 +590,7 @@ BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16) Stream a uint32. ********************************************************************/ -BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32) +BOOL prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32) { char *q = prs_mem_get(ps, sizeof(uint32)); if (q == NULL) @@ -619,7 +619,7 @@ BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32) Stream a NTSTATUS ********************************************************************/ -BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status) +BOOL prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status) { char *q = prs_mem_get(ps, sizeof(uint32)); if (q == NULL) @@ -649,7 +649,7 @@ BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status) Stream a WERROR ********************************************************************/ -BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status) +BOOL prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status) { char *q = prs_mem_get(ps, sizeof(uint32)); if (q == NULL) @@ -680,7 +680,7 @@ BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status) Stream an array of uint8s. Length is number of uint8s. ********************************************************************/ -BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *data8s, int len) +BOOL prs_uint8s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len) { int i; char *q = prs_mem_get(ps, len); @@ -713,7 +713,7 @@ BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *dat Stream an array of uint16s. Length is number of uint16s. ********************************************************************/ -BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len) +BOOL prs_uint16s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len) { int i; char *q = prs_mem_get(ps, len * sizeof(uint16)); @@ -757,7 +757,7 @@ BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *d output must be little-endian, if marshalling, input must be little-endian. ********************************************************************/ -static void dbg_rw_punival(BOOL charmode, char *name, int depth, prs_struct *ps, +static void dbg_rw_punival(BOOL charmode, const char *name, int depth, prs_struct *ps, char *in_buf, char *out_buf, int len) { int i; @@ -794,7 +794,7 @@ static void dbg_rw_punival(BOOL charmode, char *name, int depth, prs_struct *ps, Stream a unistr. Always little endian. ********************************************************************/ -BOOL prs_uint16uni(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len) +BOOL prs_uint16uni(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len) { char *q = prs_mem_get(ps, len * sizeof(uint16)); if (q == NULL) @@ -810,7 +810,7 @@ BOOL prs_uint16uni(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 Stream an array of uint32s. Length is number of uint32s. ********************************************************************/ -BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len) +BOOL prs_uint32s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len) { int i; char *q = prs_mem_get(ps, len * sizeof(uint32)); @@ -854,7 +854,7 @@ BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *d in uint16 chars. The unicode string is already in little-endian format. ********************************************************************/ -BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 *str) +BOOL prs_buffer5(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str) { char *p; char *q = prs_mem_get(ps, str->buf_len * sizeof(uint16)); @@ -885,7 +885,7 @@ BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 * in byte chars. String is in little-endian format. ********************************************************************/ -BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 *str) +BOOL prs_buffer2(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER2 *str) { char *p; char *q = prs_mem_get(ps, str->buf_len); @@ -913,7 +913,7 @@ BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 * in uint8 chars. ********************************************************************/ -BOOL prs_string2(BOOL charmode, char *name, prs_struct *ps, int depth, STRING2 *str) +BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str) { int i; char *q = prs_mem_get(ps, str->str_max_len); @@ -953,7 +953,7 @@ BOOL prs_string2(BOOL charmode, char *name, prs_struct *ps, int depth, STRING2 * in uint16 chars. The unicode string is already in little-endian format. ********************************************************************/ -BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 *str) +BOOL prs_unistr2(BOOL charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str) { char *p; char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16)); @@ -984,7 +984,7 @@ BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 * in uint16 chars. The unicode string is already in little-endian format. ********************************************************************/ -BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int depth) +BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth) { char *p; char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16)); @@ -1010,7 +1010,7 @@ BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int de in little-endian format then do it as a stream of bytes. ********************************************************************/ -BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str) +BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str) { int len = 0; unsigned char *p = (unsigned char *)str->buffer; @@ -1136,7 +1136,7 @@ BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str) not include the null-termination character. ********************************************************************/ -BOOL prs_string(char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size) +BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size) { char *q; int i; @@ -1173,7 +1173,7 @@ BOOL prs_string(char *name, prs_struct *ps, int depth, char *str, int len, int m uint16 should be stored, or gets the size if reading. ********************************************************************/ -BOOL prs_uint16_pre(char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset) +BOOL prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset) { *offset = ps->data_offset; if (UNMARSHALLING(ps)) { @@ -1193,7 +1193,7 @@ BOOL prs_uint16_pre(char *name, prs_struct *ps, int depth, uint16 *data16, uint3 does nothing on reading, as that is already handled by ...._pre() ********************************************************************/ -BOOL prs_uint16_post(char *name, prs_struct *ps, int depth, uint16 *data16, +BOOL prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 ptr_uint16, uint32 start_offset) { if (MARSHALLING(ps)) { @@ -1220,7 +1220,7 @@ BOOL prs_uint16_post(char *name, prs_struct *ps, int depth, uint16 *data16, uint32 should be stored, or gets the size if reading. ********************************************************************/ -BOOL prs_uint32_pre(char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset) +BOOL prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset) { *offset = ps->data_offset; if (UNMARSHALLING(ps) && (data32 != NULL)) { @@ -1237,7 +1237,7 @@ BOOL prs_uint32_pre(char *name, prs_struct *ps, int depth, uint32 *data32, uint3 does nothing on reading, as that is already handled by ...._pre() ********************************************************************/ -BOOL prs_uint32_post(char *name, prs_struct *ps, int depth, uint32 *data32, +BOOL prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 ptr_uint32, uint32 data_size) { if (MARSHALLING(ps)) { diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 7bb8a6e2b4..456fad69b4 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -62,7 +62,7 @@ void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR *q_o, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_hkcr(char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_open_hkcr(const char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -93,7 +93,7 @@ BOOL reg_io_q_open_hkcr(char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int d reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_hkcr(char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_open_hkcr(const char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -130,7 +130,7 @@ void init_reg_q_open_hklm(REG_Q_OPEN_HKLM * q_o, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, +BOOL reg_io_q_open_hklm(const char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, int depth) { if (r_q == NULL) @@ -161,7 +161,7 @@ BOOL reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, +BOOL reg_io_r_open_hklm(const char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, int depth) { if (r_r == NULL) @@ -198,7 +198,7 @@ void init_reg_q_flush_key(REG_Q_FLUSH_KEY *q_u, POLICY_HND *pol) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_flush_key(char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_flush_key(const char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -219,7 +219,7 @@ BOOL reg_io_q_flush_key(char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int d reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_flush_key(char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_flush_key(const char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -311,7 +311,7 @@ void init_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_create_key(const char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -367,7 +367,7 @@ BOOL reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_create_key(char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_create_key(const char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -410,7 +410,7 @@ void init_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_delete_val(char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -439,7 +439,7 @@ BOOL reg_io_q_delete_val(char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_delete_val(char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_delete_val(const char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -476,7 +476,7 @@ void init_reg_q_delete_key(REG_Q_DELETE_KEY *q_c, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_delete_key(char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_delete_key(const char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -504,7 +504,7 @@ BOOL reg_io_q_delete_key(char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_delete_key(char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_delete_key(const char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -539,7 +539,7 @@ void init_reg_q_query_key(REG_Q_QUERY_KEY *q_o, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_query_key(char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_query_key(const char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -568,7 +568,7 @@ BOOL reg_io_q_query_key(char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int d reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_query_key(char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_query_key(const char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -624,7 +624,7 @@ void init_reg_q_unknown_1a(REG_Q_UNKNOWN_1A *q_o, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_unknown_1a(char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_unknown_1a(const char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -645,7 +645,7 @@ BOOL reg_io_q_unknown_1a(char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_unknown_1a(const char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -669,7 +669,7 @@ BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_save_key(char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_save_key(const char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -698,7 +698,7 @@ BOOL reg_io_q_save_key(char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int dep reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_save_key(char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_save_key(const char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -732,7 +732,7 @@ void init_reg_q_open_hku(REG_Q_OPEN_HKU *q_o, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_open_hku(const char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -761,7 +761,7 @@ BOOL reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int dep reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_hku(char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_open_hku(const char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -796,7 +796,7 @@ void init_reg_q_close(REG_Q_CLOSE *q_c, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth) +BOOL reg_io_q_close(const char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -819,7 +819,7 @@ BOOL reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth) reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) +BOOL reg_io_r_close(const char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -860,7 +860,7 @@ void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, SEC_DESC_BU reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_set_key_sec(char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_set_key_sec(const char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -889,7 +889,7 @@ BOOL reg_io_q_set_key_sec(char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_set_key_sec(const char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -930,7 +930,7 @@ void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_get_key_sec(char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_get_key_sec(const char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -975,7 +975,7 @@ makes a structure. reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_get_key_sec(char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_get_key_sec(const char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1041,7 +1041,7 @@ BOOL init_reg_q_info(REG_Q_INFO *q_i, POLICY_HND *pol, char* val_name) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_info(char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_info(const char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1174,7 +1174,7 @@ BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_info(const char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -1298,7 +1298,7 @@ void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val ) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth) +BOOL reg_io_q_enum_val(const char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1357,7 +1357,7 @@ BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int d reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_enum_val(char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_enum_val(const char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1435,7 +1435,7 @@ void init_reg_q_create_val(REG_Q_CREATE_VALUE *q_i, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_create_val(char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth) +BOOL reg_io_q_create_val(const char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1470,7 +1470,7 @@ BOOL reg_io_q_create_val(char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_create_val(char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_create_val(const char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1537,7 +1537,7 @@ void init_reg_r_enum_key(REG_R_ENUM_KEY *r_u, char *subkey, uint32 unknown_1, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_enum_key(char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth) +BOOL reg_io_q_enum_key(const char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1591,7 +1591,7 @@ BOOL reg_io_q_enum_key(char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int dep reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_enum_key(char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_enum_key(const char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1665,7 +1665,7 @@ void init_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_open_entry(const char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1713,7 +1713,7 @@ void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_entry(char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_open_entry(const char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -1759,7 +1759,7 @@ void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, const char *msg, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, +BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, int depth) { if (q_s == NULL) @@ -1798,7 +1798,7 @@ BOOL reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_shutdown(char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps, +BOOL reg_io_r_shutdown(const char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps, int depth) { if (r_s == NULL) @@ -1829,7 +1829,7 @@ void init_reg_q_abort_shutdown(REG_Q_ABORT_SHUTDOWN * q_s) /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s, +BOOL reg_io_q_abort_shutdown(const char *desc, REG_Q_ABORT_SHUTDOWN * q_s, prs_struct *ps, int depth) { if (q_s == NULL) @@ -1853,7 +1853,7 @@ BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_abort_shutdown(char *desc, REG_R_ABORT_SHUTDOWN * r_s, +BOOL reg_io_r_abort_shutdown(const char *desc, REG_R_ABORT_SHUTDOWN * r_s, prs_struct *ps, int depth) { if (r_s == NULL) diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index e8825a2e14..fafbbb1965 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -143,7 +143,7 @@ interface/version dce/rpc pipe identification * update the index #defines in smb.h. */ -struct pipe_id_info pipe_names [] = +const struct pipe_id_info pipe_names [] = { /* client pipe , abstract syntax , server pipe , transfer syntax */ { PIPE_LSARPC , SYNT_LSARPC_V0 , PIPE_LSASS , TRANS_SYNT_V2 }, @@ -182,7 +182,7 @@ void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags, Reads or writes an RPC_HDR structure. ********************************************************************/ -BOOL smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -236,7 +236,7 @@ BOOL smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth) Reads or writes an RPC_IFACE structure. ********************************************************************/ -static BOOL smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth) +static BOOL smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth) { if (ifc == NULL) return False; @@ -266,7 +266,7 @@ static BOOL smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int dep Inits an RPC_ADDR_STR structure. ********************************************************************/ -static void init_rpc_addr_str(RPC_ADDR_STR *str, char *name) +static void init_rpc_addr_str(RPC_ADDR_STR *str, const char *name) { str->len = strlen(name) + 1; fstrcpy(str->str, name); @@ -276,7 +276,7 @@ static void init_rpc_addr_str(RPC_ADDR_STR *str, char *name) Reads or writes an RPC_ADDR_STR structure. ********************************************************************/ -static BOOL smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth) +static BOOL smb_io_rpc_addr_str(const char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth) { if (str == NULL) return False; @@ -308,7 +308,7 @@ static void init_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsiz Reads or writes an RPC_HDR_BBA structure. ********************************************************************/ -static BOOL smb_io_rpc_hdr_bba(char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth) +static BOOL smb_io_rpc_hdr_bba(const char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -351,7 +351,7 @@ void init_rpc_hdr_rb(RPC_HDR_RB *rpc, Reads or writes an RPC_HDR_RB structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_rb(char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -397,7 +397,7 @@ static void init_rpc_results(RPC_RESULTS *res, lkclXXXX only one reason at the moment! ********************************************************************/ -static BOOL smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int depth) +static BOOL smb_io_rpc_results(const char *desc, RPC_RESULTS *res, prs_struct *ps, int depth) { if (res == NULL) return False; @@ -430,7 +430,7 @@ static BOOL smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int void init_rpc_hdr_ba(RPC_HDR_BA *rpc, uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid, - char *pipe_addr, + const char *pipe_addr, uint8 num_results, uint16 result, uint16 reason, RPC_IFACE *transfer) { @@ -446,7 +446,7 @@ void init_rpc_hdr_ba(RPC_HDR_BA *rpc, Reads or writes an RPC_HDR_BA structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_ba(char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -480,7 +480,7 @@ void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum) Reads or writes an RPC_HDR_REQ structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -501,7 +501,7 @@ BOOL smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth) Reads or writes an RPC_HDR_RESP structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -524,7 +524,7 @@ BOOL smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int dept Reads or writes an RPC_HDR_FAULT structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_fault(char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth) { if (rpc == NULL) return False; @@ -564,7 +564,7 @@ void init_rpc_hdr_autha(RPC_HDR_AUTHA *rai, Reads or writes an RPC_HDR_AUTHA structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_autha(char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_autha(const char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth) { if (rai == NULL) return False; @@ -622,7 +622,7 @@ void init_rpc_hdr_auth(RPC_HDR_AUTH *rai, Reads or writes an RPC_HDR_AUTH structure. ********************************************************************/ -BOOL smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth) +BOOL smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth) { if (rai == NULL) return False; @@ -653,7 +653,7 @@ BOOL smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int dept ********************************************************************/ BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav, - char *signature, uint32 msg_type) + const char *signature, uint32 msg_type) { return (strequal(rav->signature, signature) && rav->msg_type == msg_type); } @@ -663,7 +663,7 @@ BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav, ********************************************************************/ void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, - char *signature, uint32 msg_type) + const char *signature, uint32 msg_type) { fstrcpy(rav->signature, signature); /* "NTLMSSP" */ rav->msg_type = msg_type; /* NTLMSSP_MESSAGE_TYPE */ @@ -673,7 +673,7 @@ void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, Reads or writes an RPC_AUTH_VERIFIER structure. ********************************************************************/ -BOOL smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth) +BOOL smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth) { if (rav == NULL) return False; @@ -717,7 +717,7 @@ void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg, *** lkclXXXX HACK ALERT! *** ********************************************************************/ -BOOL smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth) +BOOL smb_io_rpc_auth_ntlmssp_neg(const char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth) { uint32 start_offset = prs_offset(ps); if (neg == NULL) @@ -804,7 +804,7 @@ void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL *chl, Reads or writes an RPC_AUTH_NTLMSSP_CHAL structure. ********************************************************************/ -BOOL smb_io_rpc_auth_ntlmssp_chal(char *desc, RPC_AUTH_NTLMSSP_CHAL *chl, prs_struct *ps, int depth) +BOOL smb_io_rpc_auth_ntlmssp_chal(const char *desc, RPC_AUTH_NTLMSSP_CHAL *chl, prs_struct *ps, int depth) { if (chl == NULL) return False; @@ -908,7 +908,7 @@ void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp, *** lkclXXXX the actual offset is at the start of the auth verifier *** ********************************************************************/ -BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_struct *ps, int depth) +BOOL smb_io_rpc_auth_ntlmssp_resp(const char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_struct *ps, int depth) { if (rsp == NULL) return False; @@ -1082,7 +1082,7 @@ void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk, Reads or writes an RPC_AUTH_NTLMSSP_CHK structure. ********************************************************************/ -BOOL smb_io_rpc_auth_ntlmssp_chk(char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth) +BOOL smb_io_rpc_auth_ntlmssp_chk(const char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth) { if (chk == NULL) return False; diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 61b13d1350..918cdbcd1d 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -47,7 +47,7 @@ void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND * q_c, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND * q_u, +BOOL samr_io_q_close_hnd(const char *desc, SAMR_Q_CLOSE_HND * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -66,7 +66,7 @@ BOOL samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_close_hnd(char *desc, SAMR_R_CLOSE_HND * r_u, +BOOL samr_io_r_close_hnd(const char *desc, SAMR_R_CLOSE_HND * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -107,7 +107,7 @@ void init_samr_q_lookup_domain(SAMR_Q_LOOKUP_DOMAIN * q_u, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_lookup_domain(char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u, +BOOL samr_io_q_lookup_domain(const char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -152,7 +152,7 @@ void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_lookup_domain(char *desc, SAMR_R_LOOKUP_DOMAIN * r_u, +BOOL samr_io_r_lookup_domain(const char *desc, SAMR_R_LOOKUP_DOMAIN * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -196,7 +196,7 @@ void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D * q_u, POLICY_HND *dom_pol, DOM_SI reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_unknown_2d(char *desc, SAMR_Q_UNKNOWN_2D * q_u, +BOOL samr_io_q_unknown_2d(const char *desc, SAMR_Q_UNKNOWN_2D * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -224,7 +224,7 @@ BOOL samr_io_q_unknown_2d(char *desc, SAMR_Q_UNKNOWN_2D * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_unknown_2d(char *desc, SAMR_R_UNKNOWN_2D * r_u, +BOOL samr_io_r_unknown_2d(const char *desc, SAMR_R_UNKNOWN_2D * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -261,7 +261,7 @@ void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_open_domain(char *desc, SAMR_Q_OPEN_DOMAIN * q_u, +BOOL samr_io_q_open_domain(const char *desc, SAMR_Q_OPEN_DOMAIN * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -289,7 +289,7 @@ BOOL samr_io_q_open_domain(char *desc, SAMR_Q_OPEN_DOMAIN * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_open_domain(char *desc, SAMR_R_OPEN_DOMAIN * r_u, +BOOL samr_io_r_open_domain(const char *desc, SAMR_R_OPEN_DOMAIN * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -326,7 +326,7 @@ void init_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_get_usrdom_pwinfo(char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u, +BOOL samr_io_q_get_usrdom_pwinfo(const char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -368,7 +368,7 @@ void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO *r_u, NTSTATUS statu reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_get_usrdom_pwinfo(char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u, +BOOL samr_io_r_get_usrdom_pwinfo(const char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -397,7 +397,7 @@ BOOL samr_io_r_get_usrdom_pwinfo(char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_set_sec_obj(char *desc, SAMR_Q_SET_SEC_OBJ * q_u, +BOOL samr_io_q_set_sec_obj(const char *desc, SAMR_Q_SET_SEC_OBJ * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -440,7 +440,7 @@ void init_samr_q_query_sec_obj(SAMR_Q_QUERY_SEC_OBJ * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_sec_obj(char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u, +BOOL samr_io_q_query_sec_obj(const char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -478,7 +478,7 @@ void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_dom_info(char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u, +BOOL samr_io_q_query_dom_info(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -514,7 +514,7 @@ void init_unk_info3(SAM_UNK_INFO_3 *u_3, NTTIME nt_logout) reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info3(char *desc, SAM_UNK_INFO_3 * u_3, +static BOOL sam_io_unk_info3(const char *desc, SAM_UNK_INFO_3 * u_3, prs_struct *ps, int depth) { if (u_3 == NULL) @@ -544,7 +544,7 @@ void init_unk_info6(SAM_UNK_INFO_6 * u_6) reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info6(char *desc, SAM_UNK_INFO_6 * u_6, +static BOOL sam_io_unk_info6(const char *desc, SAM_UNK_INFO_6 * u_6, prs_struct *ps, int depth) { if (u_6 == NULL) @@ -576,7 +576,7 @@ void init_unk_info7(SAM_UNK_INFO_7 * u_7) reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info7(char *desc, SAM_UNK_INFO_7 * u_7, +static BOOL sam_io_unk_info7(const char *desc, SAM_UNK_INFO_7 * u_7, prs_struct *ps, int depth) { if (u_7 == NULL) @@ -609,7 +609,7 @@ void init_unk_info12(SAM_UNK_INFO_12 * u_12, NTTIME nt_lock_duration, NTTIME nt_ reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info12(char *desc, SAM_UNK_INFO_12 * u_12, +static BOOL sam_io_unk_info12(const char *desc, SAM_UNK_INFO_12 * u_12, prs_struct *ps, int depth) { if (u_12 == NULL) @@ -644,7 +644,7 @@ void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *server) reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info5(char *desc, SAM_UNK_INFO_5 * u_5, +static BOOL sam_io_unk_info5(const char *desc, SAM_UNK_INFO_5 * u_5, prs_struct *ps, int depth) { if (u_5 == NULL) @@ -700,7 +700,7 @@ void init_unk_info2(SAM_UNK_INFO_2 * u_2, reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info2(char *desc, SAM_UNK_INFO_2 * u_2, +static BOOL sam_io_unk_info2(const char *desc, SAM_UNK_INFO_2 * u_2, prs_struct *ps, int depth) { if (u_2 == NULL) @@ -787,7 +787,7 @@ void init_unk_info1(SAM_UNK_INFO_1 *u_1, uint16 min_pass_len, uint16 pass_hist, reads or writes a structure. ********************************************************************/ -static BOOL sam_io_unk_info1(char *desc, SAM_UNK_INFO_1 * u_1, +static BOOL sam_io_unk_info1(const char *desc, SAM_UNK_INFO_1 * u_1, prs_struct *ps, int depth) { if (u_1 == NULL) @@ -835,7 +835,7 @@ void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_dom_info(char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u, +BOOL samr_io_r_query_dom_info(const char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -906,7 +906,7 @@ BOOL samr_io_r_query_dom_info(char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u, reads or writes a SAMR_R_SET_SEC_OBJ structure. ********************************************************************/ -BOOL samr_io_r_set_sec_obj(char *desc, SAMR_R_SET_SEC_OBJ * r_u, +BOOL samr_io_r_set_sec_obj(const char *desc, SAMR_R_SET_SEC_OBJ * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -928,7 +928,7 @@ BOOL samr_io_r_set_sec_obj(char *desc, SAMR_R_SET_SEC_OBJ * r_u, reads or writes a SAMR_R_QUERY_SEC_OBJ structure. ********************************************************************/ -BOOL samr_io_r_query_sec_obj(char *desc, SAMR_R_QUERY_SEC_OBJ * r_u, +BOOL samr_io_r_query_sec_obj(const char *desc, SAMR_R_QUERY_SEC_OBJ * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -957,7 +957,7 @@ BOOL samr_io_r_query_sec_obj(char *desc, SAMR_R_QUERY_SEC_OBJ * r_u, reads or writes a SAM_STR1 structure. ********************************************************************/ -static BOOL sam_io_sam_str1(char *desc, SAM_STR1 * sam, uint32 acct_buf, +static BOOL sam_io_sam_str1(const char *desc, SAM_STR1 * sam, uint32 acct_buf, uint32 name_buf, uint32 desc_buf, prs_struct *ps, int depth) { @@ -1007,7 +1007,7 @@ static void init_sam_entry1(SAM_ENTRY1 * sam, uint32 user_idx, reads or writes a SAM_ENTRY1 structure. ********************************************************************/ -static BOOL sam_io_sam_entry1(char *desc, SAM_ENTRY1 * sam, +static BOOL sam_io_sam_entry1(const char *desc, SAM_ENTRY1 * sam, prs_struct *ps, int depth) { if (sam == NULL) @@ -1044,7 +1044,7 @@ static BOOL sam_io_sam_entry1(char *desc, SAM_ENTRY1 * sam, reads or writes a SAM_STR2 structure. ********************************************************************/ -static BOOL sam_io_sam_str2(char *desc, SAM_STR2 * sam, uint32 acct_buf, +static BOOL sam_io_sam_str2(const char *desc, SAM_STR2 * sam, uint32 acct_buf, uint32 desc_buf, prs_struct *ps, int depth) { if (sam == NULL) @@ -1085,7 +1085,7 @@ static void init_sam_entry2(SAM_ENTRY2 * sam, uint32 user_idx, reads or writes a SAM_ENTRY2 structure. ********************************************************************/ -static BOOL sam_io_sam_entry2(char *desc, SAM_ENTRY2 * sam, +static BOOL sam_io_sam_entry2(const char *desc, SAM_ENTRY2 * sam, prs_struct *ps, int depth) { if (sam == NULL) @@ -1120,7 +1120,7 @@ static BOOL sam_io_sam_entry2(char *desc, SAM_ENTRY2 * sam, reads or writes a SAM_STR3 structure. ********************************************************************/ -static BOOL sam_io_sam_str3(char *desc, SAM_STR3 * sam, uint32 acct_buf, +static BOOL sam_io_sam_str3(const char *desc, SAM_STR3 * sam, uint32 acct_buf, uint32 desc_buf, prs_struct *ps, int depth) { if (sam == NULL) @@ -1162,7 +1162,7 @@ static void init_sam_entry3(SAM_ENTRY3 * sam, uint32 grp_idx, reads or writes a SAM_ENTRY3 structure. ********************************************************************/ -static BOOL sam_io_sam_entry3(char *desc, SAM_ENTRY3 * sam, +static BOOL sam_io_sam_entry3(const char *desc, SAM_ENTRY3 * sam, prs_struct *ps, int depth) { if (sam == NULL) @@ -1207,7 +1207,7 @@ static void init_sam_entry4(SAM_ENTRY4 * sam, uint32 user_idx, reads or writes a SAM_ENTRY4 structure. ********************************************************************/ -static BOOL sam_io_sam_entry4(char *desc, SAM_ENTRY4 * sam, +static BOOL sam_io_sam_entry4(const char *desc, SAM_ENTRY4 * sam, prs_struct *ps, int depth) { if (sam == NULL) @@ -1245,7 +1245,7 @@ static void init_sam_entry5(SAM_ENTRY5 * sam, uint32 grp_idx, reads or writes a SAM_ENTRY5 structure. ********************************************************************/ -static BOOL sam_io_sam_entry5(char *desc, SAM_ENTRY5 * sam, +static BOOL sam_io_sam_entry5(const char *desc, SAM_ENTRY5 * sam, prs_struct *ps, int depth) { if (sam == NULL) @@ -1281,7 +1281,7 @@ void init_sam_entry(SAM_ENTRY * sam, uint32 len_sam_name, uint32 rid) reads or writes a SAM_ENTRY structure. ********************************************************************/ -static BOOL sam_io_sam_entry(char *desc, SAM_ENTRY * sam, +static BOOL sam_io_sam_entry(const char *desc, SAM_ENTRY * sam, prs_struct *ps, int depth) { if (sam == NULL) @@ -1322,7 +1322,7 @@ void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS * q_e, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_enum_dom_users(char *desc, SAMR_Q_ENUM_DOM_USERS * q_e, +BOOL samr_io_q_enum_dom_users(const char *desc, SAMR_Q_ENUM_DOM_USERS * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -1380,7 +1380,7 @@ void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_enum_dom_users(char *desc, SAMR_R_ENUM_DOM_USERS * r_u, +BOOL samr_io_r_enum_dom_users(const char *desc, SAMR_R_ENUM_DOM_USERS * r_u, prs_struct *ps, int depth) { uint32 i; @@ -1465,7 +1465,7 @@ void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO * q_e, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_dispinfo(char *desc, SAMR_Q_QUERY_DISPINFO * q_e, +BOOL samr_io_q_query_dispinfo(const char *desc, SAMR_Q_QUERY_DISPINFO * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -1585,7 +1585,7 @@ NTSTATUS init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 num_en reads or writes a structure. ********************************************************************/ -static BOOL sam_io_sam_dispinfo_1(char *desc, SAM_DISPINFO_1 * sam, +static BOOL sam_io_sam_dispinfo_1(const char *desc, SAM_DISPINFO_1 * sam, uint32 num_entries, prs_struct *ps, int depth) { @@ -1702,7 +1702,7 @@ NTSTATUS init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 num_en reads or writes a structure. ********************************************************************/ -static BOOL sam_io_sam_dispinfo_2(char *desc, SAM_DISPINFO_2 * sam, +static BOOL sam_io_sam_dispinfo_2(const char *desc, SAM_DISPINFO_2 * sam, uint32 num_entries, prs_struct *ps, int depth) { @@ -1796,7 +1796,7 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_en reads or writes a structure. ********************************************************************/ -static BOOL sam_io_sam_dispinfo_3(char *desc, SAM_DISPINFO_3 * sam, +static BOOL sam_io_sam_dispinfo_3(const char *desc, SAM_DISPINFO_3 * sam, uint32 num_entries, prs_struct *ps, int depth) { @@ -1888,7 +1888,7 @@ NTSTATUS init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 num_en reads or writes a structure. ********************************************************************/ -static BOOL sam_io_sam_dispinfo_4(char *desc, SAM_DISPINFO_4 * sam, +static BOOL sam_io_sam_dispinfo_4(const char *desc, SAM_DISPINFO_4 * sam, uint32 num_entries, prs_struct *ps, int depth) { @@ -1978,7 +1978,7 @@ NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_en reads or writes a structure. ********************************************************************/ -static BOOL sam_io_sam_dispinfo_5(char *desc, SAM_DISPINFO_5 * sam, +static BOOL sam_io_sam_dispinfo_5(const char *desc, SAM_DISPINFO_5 * sam, uint32 num_entries, prs_struct *ps, int depth) { @@ -2057,7 +2057,7 @@ void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_dispinfo(char *desc, SAMR_R_QUERY_DISPINFO * r_u, +BOOL samr_io_r_query_dispinfo(const char *desc, SAMR_R_QUERY_DISPINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2155,7 +2155,7 @@ void init_samr_q_open_group(SAMR_Q_OPEN_GROUP * q_c, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_open_group(char *desc, SAMR_Q_OPEN_GROUP * q_u, +BOOL samr_io_q_open_group(const char *desc, SAMR_Q_OPEN_GROUP * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -2182,7 +2182,7 @@ BOOL samr_io_q_open_group(char *desc, SAMR_Q_OPEN_GROUP * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_open_group(char *desc, SAMR_R_OPEN_GROUP * r_u, +BOOL samr_io_r_open_group(const char *desc, SAMR_R_OPEN_GROUP * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2231,7 +2231,7 @@ void init_samr_group_info1(GROUP_INFO1 * gr1, reads or writes a structure. ********************************************************************/ -BOOL samr_io_group_info1(char *desc, GROUP_INFO1 * gr1, +BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1, prs_struct *ps, int depth) { if (gr1 == NULL) @@ -2280,7 +2280,7 @@ void init_samr_group_info3(GROUP_INFO3 *gr3) reads or writes a structure. ********************************************************************/ -BOOL samr_io_group_info3(char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth) +BOOL samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth) { if (gr3 == NULL) return False; @@ -2315,7 +2315,7 @@ void init_samr_group_info4(GROUP_INFO4 * gr4, char *acct_desc) reads or writes a structure. ********************************************************************/ -BOOL samr_io_group_info4(char *desc, GROUP_INFO4 * gr4, +BOOL samr_io_group_info4(const char *desc, GROUP_INFO4 * gr4, prs_struct *ps, int depth) { if (gr4 == NULL) @@ -2340,7 +2340,7 @@ BOOL samr_io_group_info4(char *desc, GROUP_INFO4 * gr4, reads or writes a structure. ********************************************************************/ -static BOOL samr_group_info_ctr(char *desc, GROUP_INFO_CTR **ctr, +static BOOL samr_group_info_ctr(const char *desc, GROUP_INFO_CTR **ctr, prs_struct *ps, int depth) { if (UNMARSHALLING(ps)) @@ -2400,7 +2400,7 @@ void init_samr_q_create_dom_group(SAMR_Q_CREATE_DOM_GROUP * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_create_dom_group(char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e, +BOOL samr_io_q_create_dom_group(const char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -2433,7 +2433,7 @@ BOOL samr_io_q_create_dom_group(char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_create_dom_group(char *desc, SAMR_R_CREATE_DOM_GROUP * r_u, +BOOL samr_io_r_create_dom_group(const char *desc, SAMR_R_CREATE_DOM_GROUP * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2472,7 +2472,7 @@ void init_samr_q_delete_dom_group(SAMR_Q_DELETE_DOM_GROUP * q_c, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_delete_dom_group(char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u, +BOOL samr_io_q_delete_dom_group(const char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -2494,7 +2494,7 @@ BOOL samr_io_q_delete_dom_group(char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_delete_dom_group(char *desc, SAMR_R_DELETE_DOM_GROUP * r_u, +BOOL samr_io_r_delete_dom_group(const char *desc, SAMR_R_DELETE_DOM_GROUP * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2532,7 +2532,7 @@ void init_samr_q_del_groupmem(SAMR_Q_DEL_GROUPMEM * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_del_groupmem(char *desc, SAMR_Q_DEL_GROUPMEM * q_e, +BOOL samr_io_q_del_groupmem(const char *desc, SAMR_Q_DEL_GROUPMEM * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -2569,7 +2569,7 @@ void init_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM * r_u, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_del_groupmem(char *desc, SAMR_R_DEL_GROUPMEM * r_u, +BOOL samr_io_r_del_groupmem(const char *desc, SAMR_R_DEL_GROUPMEM * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2605,7 +2605,7 @@ void init_samr_q_add_groupmem(SAMR_Q_ADD_GROUPMEM * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_add_groupmem(char *desc, SAMR_Q_ADD_GROUPMEM * q_e, +BOOL samr_io_q_add_groupmem(const char *desc, SAMR_Q_ADD_GROUPMEM * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -2644,7 +2644,7 @@ void init_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM * r_u, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_add_groupmem(char *desc, SAMR_R_ADD_GROUPMEM * r_u, +BOOL samr_io_r_add_groupmem(const char *desc, SAMR_R_ADD_GROUPMEM * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2679,7 +2679,7 @@ void init_samr_q_set_groupinfo(SAMR_Q_SET_GROUPINFO * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_set_groupinfo(char *desc, SAMR_Q_SET_GROUPINFO * q_e, +BOOL samr_io_q_set_groupinfo(const char *desc, SAMR_Q_SET_GROUPINFO * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -2715,7 +2715,7 @@ void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO * r_u, NTSTATUS status) reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_set_groupinfo(char *desc, SAMR_R_SET_GROUPINFO * r_u, +BOOL samr_io_r_set_groupinfo(const char *desc, SAMR_R_SET_GROUPINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2751,7 +2751,7 @@ void init_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_groupinfo(char *desc, SAMR_Q_QUERY_GROUPINFO * q_e, +BOOL samr_io_q_query_groupinfo(const char *desc, SAMR_Q_QUERY_GROUPINFO * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -2790,7 +2790,7 @@ void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_groupinfo(char *desc, SAMR_R_QUERY_GROUPINFO * r_u, +BOOL samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -2833,7 +2833,7 @@ void init_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM * q_c, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_groupmem(char *desc, SAMR_Q_QUERY_GROUPMEM * q_u, +BOOL samr_io_q_query_groupmem(const char *desc, SAMR_Q_QUERY_GROUPMEM * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -2885,7 +2885,7 @@ void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_groupmem(char *desc, SAMR_R_QUERY_GROUPMEM * r_u, +BOOL samr_io_r_query_groupmem(const char *desc, SAMR_R_QUERY_GROUPMEM * r_u, prs_struct *ps, int depth) { uint32 i; @@ -2967,7 +2967,7 @@ void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_usergroups(char *desc, SAMR_Q_QUERY_USERGROUPS * q_u, +BOOL samr_io_q_query_usergroups(const char *desc, SAMR_Q_QUERY_USERGROUPS * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -3016,7 +3016,7 @@ void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_gids(char *desc, uint32 *num_gids, DOM_GID ** gid, +BOOL samr_io_gids(const char *desc, uint32 *num_gids, DOM_GID ** gid, prs_struct *ps, int depth) { uint32 i; @@ -3054,7 +3054,7 @@ BOOL samr_io_gids(char *desc, uint32 *num_gids, DOM_GID ** gid, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_usergroups(char *desc, SAMR_R_QUERY_USERGROUPS * r_u, +BOOL samr_io_r_query_usergroups(const char *desc, SAMR_R_QUERY_USERGROUPS * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -3109,7 +3109,7 @@ void init_samr_q_enum_domains(SAMR_Q_ENUM_DOMAINS * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_enum_domains(char *desc, SAMR_Q_ENUM_DOMAINS * q_e, +BOOL samr_io_q_enum_domains(const char *desc, SAMR_Q_ENUM_DOMAINS * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -3161,7 +3161,7 @@ void init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_enum_domains(char *desc, SAMR_R_ENUM_DOMAINS * r_u, +BOOL samr_io_r_enum_domains(const char *desc, SAMR_R_ENUM_DOMAINS * r_u, prs_struct *ps, int depth) { uint32 i; @@ -3248,7 +3248,7 @@ void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_enum_dom_groups(char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e, +BOOL samr_io_q_enum_dom_groups(const char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -3300,7 +3300,7 @@ void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_enum_dom_groups(char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u, +BOOL samr_io_r_enum_dom_groups(const char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u, prs_struct *ps, int depth) { uint32 i; @@ -3383,7 +3383,7 @@ void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_enum_dom_aliases(char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e, +BOOL samr_io_q_enum_dom_aliases(const char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -3434,7 +3434,7 @@ void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES *r_u, uint32 next_idx, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_enum_dom_aliases(char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u, +BOOL samr_io_r_enum_dom_aliases(const char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u, prs_struct *ps, int depth) { uint32 i; @@ -3521,7 +3521,7 @@ void init_samr_alias_info1(ALIAS_INFO1 * al1, char *acct_name, uint32 num_member reads or writes a structure. ********************************************************************/ -BOOL samr_io_alias_info1(char *desc, ALIAS_INFO1 * al1, +BOOL samr_io_alias_info1(const char *desc, ALIAS_INFO1 * al1, prs_struct *ps, int depth) { if (al1 == NULL) @@ -3572,7 +3572,7 @@ void init_samr_alias_info3(ALIAS_INFO3 * al3, char *acct_desc) reads or writes a structure. ********************************************************************/ -BOOL samr_io_alias_info3(char *desc, ALIAS_INFO3 * al3, +BOOL samr_io_alias_info3(const char *desc, ALIAS_INFO3 * al3, prs_struct *ps, int depth) { if (al3 == NULL) @@ -3597,7 +3597,7 @@ BOOL samr_io_alias_info3(char *desc, ALIAS_INFO3 * al3, reads or writes a structure. ********************************************************************/ -BOOL samr_alias_info_ctr(char *desc, ALIAS_INFO_CTR * ctr, +BOOL samr_alias_info_ctr(const char *desc, ALIAS_INFO_CTR * ctr, prs_struct *ps, int depth) { if (ctr == NULL) @@ -3645,7 +3645,7 @@ void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO * q_e, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_aliasinfo(char *desc, SAMR_Q_QUERY_ALIASINFO * q_e, +BOOL samr_io_q_query_aliasinfo(const char *desc, SAMR_Q_QUERY_ALIASINFO * q_e, prs_struct *ps, int depth) { if (q_e == NULL) @@ -3684,7 +3684,7 @@ void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_aliasinfo(char *desc, SAMR_R_QUERY_ALIASINFO * r_u, +BOOL samr_io_r_query_aliasinfo(const char *desc, SAMR_R_QUERY_ALIASINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -3729,7 +3729,7 @@ void init_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_set_aliasinfo(char *desc, SAMR_Q_SET_ALIASINFO * q_u, +BOOL samr_io_q_set_aliasinfo(const char *desc, SAMR_Q_SET_ALIASINFO * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -3753,7 +3753,7 @@ BOOL samr_io_q_set_aliasinfo(char *desc, SAMR_Q_SET_ALIASINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_set_aliasinfo(char *desc, SAMR_R_SET_ALIASINFO * r_u, +BOOL samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -3795,7 +3795,7 @@ void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES * q_u, reads or writes a SAMR_Q_QUERY_USERALIASES structure. ********************************************************************/ -BOOL samr_io_q_query_useraliases(char *desc, SAMR_Q_QUERY_USERALIASES * q_u, +BOOL samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u, prs_struct *ps, int depth) { fstring tmp; @@ -3880,7 +3880,7 @@ void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_rids(char *desc, uint32 *num_rids, uint32 **rid, +BOOL samr_io_rids(const char *desc, uint32 *num_rids, uint32 **rid, prs_struct *ps, int depth) { fstring tmp; @@ -3919,7 +3919,7 @@ BOOL samr_io_rids(char *desc, uint32 *num_rids, uint32 **rid, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_useraliases(char *desc, SAMR_R_QUERY_USERALIASES * r_u, +BOOL samr_io_r_query_useraliases(const char *desc, SAMR_R_QUERY_USERALIASES * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -3967,7 +3967,7 @@ void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS * q_u, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS * q_u, +BOOL samr_io_q_open_alias(const char *desc, SAMR_Q_OPEN_ALIAS * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -3994,7 +3994,7 @@ BOOL samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_open_alias(char *desc, SAMR_R_OPEN_ALIAS * r_u, +BOOL samr_io_r_open_alias(const char *desc, SAMR_R_OPEN_ALIAS * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4044,7 +4044,7 @@ void init_samr_q_lookup_rids(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_RIDS * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_lookup_rids(char *desc, SAMR_Q_LOOKUP_RIDS * q_u, +BOOL samr_io_q_lookup_rids(const char *desc, SAMR_Q_LOOKUP_RIDS * q_u, prs_struct *ps, int depth) { uint32 i; @@ -4130,7 +4130,7 @@ void init_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_lookup_rids(char *desc, SAMR_R_LOOKUP_RIDS * r_u, +BOOL samr_io_r_lookup_rids(const char *desc, SAMR_R_LOOKUP_RIDS * r_u, prs_struct *ps, int depth) { uint32 i; @@ -4224,7 +4224,7 @@ void init_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS * q_u, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_delete_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, +BOOL samr_io_q_delete_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4246,7 +4246,7 @@ BOOL samr_io_q_delete_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_delete_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, +BOOL samr_io_r_delete_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4289,7 +4289,7 @@ void init_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_create_dom_alias(char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u, +BOOL samr_io_q_create_dom_alias(const char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4322,7 +4322,7 @@ BOOL samr_io_q_create_dom_alias(char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_create_dom_alias(char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u, +BOOL samr_io_r_create_dom_alias(const char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4363,7 +4363,7 @@ void init_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM * q_u, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM * q_u, +BOOL samr_io_q_add_aliasmem(const char *desc, SAMR_Q_ADD_ALIASMEM * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4387,7 +4387,7 @@ BOOL samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_add_aliasmem(char *desc, SAMR_R_ADD_ALIASMEM * r_u, +BOOL samr_io_r_add_aliasmem(const char *desc, SAMR_R_ADD_ALIASMEM * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4422,7 +4422,7 @@ void init_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM * q_u, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_del_aliasmem(char *desc, SAMR_Q_DEL_ALIASMEM * q_u, +BOOL samr_io_q_del_aliasmem(const char *desc, SAMR_Q_DEL_ALIASMEM * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4446,7 +4446,7 @@ BOOL samr_io_q_del_aliasmem(char *desc, SAMR_Q_DEL_ALIASMEM * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_del_aliasmem(char *desc, SAMR_R_DEL_ALIASMEM * r_u, +BOOL samr_io_r_del_aliasmem(const char *desc, SAMR_R_DEL_ALIASMEM * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4480,7 +4480,7 @@ void init_samr_q_delete_dom_alias(SAMR_Q_DELETE_DOM_ALIAS * q_c, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_delete_dom_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, +BOOL samr_io_q_delete_dom_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4514,7 +4514,7 @@ void init_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_delete_dom_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, +BOOL samr_io_r_delete_dom_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4548,7 +4548,7 @@ void init_samr_q_query_aliasmem(SAMR_Q_QUERY_ALIASMEM * q_c, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_aliasmem(char *desc, SAMR_Q_QUERY_ALIASMEM * q_u, +BOOL samr_io_q_query_aliasmem(const char *desc, SAMR_Q_QUERY_ALIASMEM * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4594,7 +4594,7 @@ void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_aliasmem(char *desc, SAMR_R_QUERY_ALIASMEM * r_u, +BOOL samr_io_r_query_aliasmem(const char *desc, SAMR_R_QUERY_ALIASMEM * r_u, prs_struct *ps, int depth) { uint32 i; @@ -4682,7 +4682,7 @@ NTSTATUS init_samr_q_lookup_names(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_NAMES * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_lookup_names(char *desc, SAMR_Q_LOOKUP_NAMES * q_u, +BOOL samr_io_q_lookup_names(const char *desc, SAMR_Q_LOOKUP_NAMES * q_u, prs_struct *ps, int depth) { uint32 i; @@ -4791,7 +4791,7 @@ NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES * r_u, +BOOL samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u, prs_struct *ps, int depth) { uint32 i; @@ -4889,7 +4889,7 @@ void init_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER * q_c, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_delete_dom_user(char *desc, SAMR_Q_DELETE_DOM_USER * q_u, +BOOL samr_io_q_delete_dom_user(const char *desc, SAMR_Q_DELETE_DOM_USER * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4911,7 +4911,7 @@ BOOL samr_io_q_delete_dom_user(char *desc, SAMR_Q_DELETE_DOM_USER * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_delete_dom_user(char *desc, SAMR_R_DELETE_DOM_USER * r_u, +BOOL samr_io_r_delete_dom_user(const char *desc, SAMR_R_DELETE_DOM_USER * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -4950,7 +4950,7 @@ void init_samr_q_open_user(SAMR_Q_OPEN_USER * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER * q_u, +BOOL samr_io_q_open_user(const char *desc, SAMR_Q_OPEN_USER * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -4977,7 +4977,7 @@ BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_open_user(char *desc, SAMR_R_OPEN_USER * r_u, +BOOL samr_io_r_open_user(const char *desc, SAMR_R_OPEN_USER * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -5026,7 +5026,7 @@ void init_samr_q_create_user(SAMR_Q_CREATE_USER * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_create_user(char *desc, SAMR_Q_CREATE_USER * q_u, +BOOL samr_io_q_create_user(const char *desc, SAMR_Q_CREATE_USER * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -5060,7 +5060,7 @@ BOOL samr_io_q_create_user(char *desc, SAMR_Q_CREATE_USER * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER * r_u, +BOOL samr_io_r_create_user(const char *desc, SAMR_R_CREATE_USER * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -5102,7 +5102,7 @@ void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO * q_u, +BOOL samr_io_q_query_userinfo(const char *desc, SAMR_Q_QUERY_USERINFO * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -5127,7 +5127,7 @@ BOOL samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO * q_u, reads or writes a LOGON_HRS structure. ********************************************************************/ -static BOOL sam_io_logon_hrs(char *desc, LOGON_HRS * hrs, +static BOOL sam_io_logon_hrs(const char *desc, LOGON_HRS * hrs, prs_struct *ps, int depth) { if (hrs == NULL) @@ -5172,7 +5172,7 @@ void init_sam_user_info12(SAM_USER_INFO_12 * usr, reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info12(char *desc, SAM_USER_INFO_12 * u, +static BOOL sam_io_user_info12(const char *desc, SAM_USER_INFO_12 * u, prs_struct *ps, int depth) { if (u == NULL) @@ -5212,7 +5212,7 @@ void init_sam_user_info10(SAM_USER_INFO_10 * usr, uint32 acb_info) reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info10(char *desc, SAM_USER_INFO_10 * usr, +static BOOL sam_io_user_info10(const char *desc, SAM_USER_INFO_10 * usr, prs_struct *ps, int depth) { if (usr == NULL) @@ -5280,7 +5280,7 @@ void init_sam_user_info11(SAM_USER_INFO_11 * usr, reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info11(char *desc, SAM_USER_INFO_11 * usr, +static BOOL sam_io_user_info11(const char *desc, SAM_USER_INFO_11 * usr, prs_struct *ps, int depth) { if (usr == NULL) @@ -5376,7 +5376,7 @@ void init_sam_user_info24(SAM_USER_INFO_24 * usr, char newpass[516], uint16 pw_l reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info24(char *desc, SAM_USER_INFO_24 * usr, +static BOOL sam_io_user_info24(const char *desc, SAM_USER_INFO_24 * usr, prs_struct *ps, int depth) { if (usr == NULL) @@ -5525,7 +5525,7 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z char *user_name, /* NULL */ char *full_name, char *home_dir, char *dir_drive, char *log_scr, - char *prof_path, char *desc, char *wkstas, + char *prof_path, const char *desc, char *wkstas, char *unk_str, char *mung_dial, uint32 user_rid, /* 0x0000 0000 */ uint32 group_rid, uint32 acb_info, uint32 unknown_3, uint16 logon_divs, @@ -5606,7 +5606,7 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info23(char *desc, SAM_USER_INFO_23 * usr, +static BOOL sam_io_user_info23(const char *desc, SAM_USER_INFO_23 * usr, prs_struct *ps, int depth) { if (usr == NULL) @@ -5742,7 +5742,7 @@ static BOOL sam_io_user_info23(char *desc, SAM_USER_INFO_23 * usr, way than normal... And there are definately other problems. JRA. ********************************************************************/ -static BOOL sam_io_user_info25(char *desc, SAM_USER_INFO_25 * usr, prs_struct *ps, int depth) +static BOOL sam_io_user_info25(const char *desc, SAM_USER_INFO_25 * usr, prs_struct *ps, int depth) { if (usr == NULL) return False; @@ -6120,7 +6120,7 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw, DOM_SID * reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info21(char *desc, SAM_USER_INFO_21 * usr, +static BOOL sam_io_user_info21(const char *desc, SAM_USER_INFO_21 * usr, prs_struct *ps, int depth) { if (usr == NULL) @@ -6253,7 +6253,7 @@ void init_sam_user_info20A(SAM_USER_INFO_20 *usr, SAM_ACCOUNT *pw) reads or writes a structure. ********************************************************************/ -static BOOL sam_io_user_info20(char *desc, SAM_USER_INFO_20 *usr, +static BOOL sam_io_user_info20(const char *desc, SAM_USER_INFO_20 *usr, prs_struct *ps, int depth) { if (usr == NULL) @@ -6374,7 +6374,7 @@ void init_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr, uchar * sess_key, reads or writes a structure. ********************************************************************/ -static BOOL samr_io_userinfo_ctr(char *desc, SAM_USERINFO_CTR **ppctr, +static BOOL samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr, prs_struct *ps, int depth) { BOOL ret; @@ -6514,7 +6514,7 @@ void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO * r_u, +BOOL samr_io_r_query_userinfo(const char *desc, SAMR_R_QUERY_USERINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -6561,7 +6561,7 @@ void init_samr_q_set_userinfo(SAMR_Q_SET_USERINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO * q_u, +BOOL samr_io_q_set_userinfo(const char *desc, SAMR_Q_SET_USERINFO * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -6598,7 +6598,7 @@ void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO * r_u, NTSTATUS status) reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_set_userinfo(char *desc, SAMR_R_SET_USERINFO * r_u, +BOOL samr_io_r_set_userinfo(const char *desc, SAMR_R_SET_USERINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -6648,7 +6648,7 @@ void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2 * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_set_userinfo2(char *desc, SAMR_Q_SET_USERINFO2 * q_u, +BOOL samr_io_q_set_userinfo2(const char *desc, SAMR_Q_SET_USERINFO2 * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -6686,7 +6686,7 @@ void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2 * r_u, NTSTATUS status) reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_set_userinfo2(char *desc, SAMR_R_SET_USERINFO2 * r_u, +BOOL samr_io_r_set_userinfo2(const char *desc, SAMR_R_SET_USERINFO2 * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -6727,7 +6727,7 @@ void init_samr_q_connect(SAMR_Q_CONNECT * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_connect(char *desc, SAMR_Q_CONNECT * q_u, +BOOL samr_io_q_connect(const char *desc, SAMR_Q_CONNECT * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -6756,7 +6756,7 @@ BOOL samr_io_q_connect(char *desc, SAMR_Q_CONNECT * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_connect(char *desc, SAMR_R_CONNECT * r_u, +BOOL samr_io_r_connect(const char *desc, SAMR_R_CONNECT * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -6803,7 +6803,7 @@ void init_samr_q_connect4(SAMR_Q_CONNECT4 * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_connect4(char *desc, SAMR_Q_CONNECT4 * q_u, +BOOL samr_io_q_connect4(const char *desc, SAMR_Q_CONNECT4 * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -6834,7 +6834,7 @@ BOOL samr_io_q_connect4(char *desc, SAMR_Q_CONNECT4 * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_connect4(char *desc, SAMR_R_CONNECT4 * r_u, +BOOL samr_io_r_connect4(const char *desc, SAMR_R_CONNECT4 * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -6873,7 +6873,7 @@ void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON * q_u) reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_connect_anon(char *desc, SAMR_Q_CONNECT_ANON * q_u, +BOOL samr_io_q_connect_anon(const char *desc, SAMR_Q_CONNECT_ANON * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -6901,7 +6901,7 @@ BOOL samr_io_q_connect_anon(char *desc, SAMR_Q_CONNECT_ANON * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_connect_anon(char *desc, SAMR_R_CONNECT_ANON * r_u, +BOOL samr_io_r_connect_anon(const char *desc, SAMR_R_CONNECT_ANON * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -6942,7 +6942,7 @@ void init_samr_q_get_dom_pwinfo(SAMR_Q_GET_DOM_PWINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_get_dom_pwinfo(char *desc, SAMR_Q_GET_DOM_PWINFO * q_u, +BOOL samr_io_q_get_dom_pwinfo(const char *desc, SAMR_Q_GET_DOM_PWINFO * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -6970,7 +6970,7 @@ BOOL samr_io_q_get_dom_pwinfo(char *desc, SAMR_Q_GET_DOM_PWINFO * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_get_dom_pwinfo(char *desc, SAMR_R_GET_DOM_PWINFO * r_u, +BOOL samr_io_r_get_dom_pwinfo(const char *desc, SAMR_R_GET_DOM_PWINFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -7020,7 +7020,7 @@ void init_enc_passwd(SAMR_ENC_PASSWD * pwd, char pass[512]) reads or writes a SAMR_ENC_PASSWD structure. ********************************************************************/ -BOOL samr_io_enc_passwd(char *desc, SAMR_ENC_PASSWD * pwd, +BOOL samr_io_enc_passwd(const char *desc, SAMR_ENC_PASSWD * pwd, prs_struct *ps, int depth) { if (pwd == NULL) @@ -7063,7 +7063,7 @@ void init_enc_hash(SAMR_ENC_HASH * hsh, uchar hash[16]) reads or writes a SAMR_ENC_HASH structure. ********************************************************************/ -BOOL samr_io_enc_hash(char *desc, SAMR_ENC_HASH * hsh, +BOOL samr_io_enc_hash(const char *desc, SAMR_ENC_HASH * hsh, prs_struct *ps, int depth) { if (hsh == NULL) @@ -7120,7 +7120,7 @@ void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER * q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_chgpasswd_user(char *desc, SAMR_Q_CHGPASSWD_USER * q_u, +BOOL samr_io_q_chgpasswd_user(const char *desc, SAMR_Q_CHGPASSWD_USER * q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -7178,7 +7178,7 @@ void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER * r_u, NTSTATUS status) reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_chgpasswd_user(char *desc, SAMR_R_CHGPASSWD_USER * r_u, +BOOL samr_io_r_chgpasswd_user(const char *desc, SAMR_R_CHGPASSWD_USER * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -7213,7 +7213,7 @@ void init_samr_q_unknown_2e(SAMR_Q_UNKNOWN_2E *q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_unknown_2e(char *desc, SAMR_Q_UNKNOWN_2E *q_u, +BOOL samr_io_q_unknown_2e(const char *desc, SAMR_Q_UNKNOWN_2E *q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -7259,7 +7259,7 @@ void init_samr_r_samr_unknown_2e(SAMR_R_UNKNOWN_2E * r_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_samr_unknown_2e(char *desc, SAMR_R_UNKNOWN_2E * r_u, +BOOL samr_io_r_samr_unknown_2e(const char *desc, SAMR_R_UNKNOWN_2E * r_u, prs_struct *ps, int depth) { if (r_u == NULL) @@ -7348,7 +7348,7 @@ void init_samr_q_set_domain_info(SAMR_Q_SET_DOMAIN_INFO *q_u, reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_set_domain_info(char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u, +BOOL samr_io_q_set_domain_info(const char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u, prs_struct *ps, int depth) { if (q_u == NULL) @@ -7429,7 +7429,7 @@ void init_samr_r_set_domain_info(SAMR_R_SET_DOMAIN_INFO * r_u, NTSTATUS status) reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_set_domain_info(char *desc, SAMR_R_SET_DOMAIN_INFO * r_u, +BOOL samr_io_r_set_domain_info(const char *desc, SAMR_R_SET_DOMAIN_INFO * r_u, prs_struct *ps, int depth) { if (r_u == NULL) diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c index cec37348b8..a49a34139e 100644 --- a/source3/rpc_parse/parse_sec.c +++ b/source3/rpc_parse/parse_sec.c @@ -40,7 +40,7 @@ void init_sec_access(SEC_ACCESS *t, uint32 mask) Reads or writes a SEC_ACCESS structure. ********************************************************************/ -BOOL sec_io_access(char *desc, SEC_ACCESS *t, prs_struct *ps, int depth) +BOOL sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth) { if (t == NULL) return False; @@ -103,7 +103,7 @@ void init_sec_ace(SEC_ACE *t, DOM_SID *sid, uint8 type, SEC_ACCESS mask, uint8 f Reads or writes a SEC_ACE structure. ********************************************************************/ -BOOL sec_io_ace(char *desc, SEC_ACE *psa, prs_struct *ps, int depth) +BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth) { uint32 old_offset; uint32 offset_ace_size; @@ -281,7 +281,7 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src) for you as it reads them. ********************************************************************/ -BOOL sec_io_acl(char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) +BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) { int i; uint32 old_offset; @@ -720,7 +720,7 @@ SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, DOM_SID *owner_sid, DOM_SID *g If reading and the *ppsd = NULL, allocates the structure. ********************************************************************/ -BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth) +BOOL sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth) { uint32 old_offset; uint32 max_offset = 0; /* after we're done, move offset to end */ @@ -890,7 +890,7 @@ SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src) Reads or writes a SEC_DESC_BUF structure. ********************************************************************/ -BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth) +BOOL sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth) { uint32 off_len; uint32 off_max_len; diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index fb5c642824..cb3b2efd9d 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -48,7 +48,7 @@ static uint32 str_len_uni(UNISTR *source) This should be moved in a more generic lib. ********************************************************************/ -BOOL spoolss_io_system_time(char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime) +BOOL spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime) { if(!prs_uint16("year", ps, depth, &systime->year)) return False; @@ -91,7 +91,7 @@ BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime) reads or writes an DOC_INFO structure. ********************************************************************/ -static BOOL smb_io_doc_info_1(char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth) +static BOOL smb_io_doc_info_1(const char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth) { if (info_1 == NULL) return False; @@ -122,7 +122,7 @@ static BOOL smb_io_doc_info_1(char *desc, DOC_INFO_1 *info_1, prs_struct *ps, in reads or writes an DOC_INFO structure. ********************************************************************/ -static BOOL smb_io_doc_info(char *desc, DOC_INFO *info, prs_struct *ps, int depth) +static BOOL smb_io_doc_info(const char *desc, DOC_INFO *info, prs_struct *ps, int depth) { uint32 useless_ptr=0; @@ -171,7 +171,7 @@ static BOOL smb_io_doc_info(char *desc, DOC_INFO *info, prs_struct *ps, int dept reads or writes an DOC_INFO_CONTAINER structure. ********************************************************************/ -static BOOL smb_io_doc_info_container(char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth) +static BOOL smb_io_doc_info_container(const char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth) { if (cont == NULL) return False; @@ -198,7 +198,7 @@ reads or writes an NOTIFY OPTION TYPE structure. structure. The _TYPE structure is really the deferred referrants (i.e the notify fields array) of the _TYPE structure. -tpot */ -static BOOL smb_io_notify_option_type(char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth) +static BOOL smb_io_notify_option_type(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "smb_io_notify_option_type"); depth++; @@ -226,7 +226,7 @@ static BOOL smb_io_notify_option_type(char *desc, SPOOL_NOTIFY_OPTION_TYPE *type reads or writes an NOTIFY OPTION TYPE DATA. ********************************************************************/ -static BOOL smb_io_notify_option_type_data(char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth) +static BOOL smb_io_notify_option_type_data(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth) { int i; @@ -257,7 +257,7 @@ static BOOL smb_io_notify_option_type_data(char *desc, SPOOL_NOTIFY_OPTION_TYPE reads or writes an NOTIFY OPTION structure. ********************************************************************/ -static BOOL smb_io_notify_option_type_ctr(char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth) +static BOOL smb_io_notify_option_type_ctr(const char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth) { int i; @@ -289,7 +289,7 @@ static BOOL smb_io_notify_option_type_ctr(char *desc, SPOOL_NOTIFY_OPTION_TYPE_C reads or writes an NOTIFY OPTION structure. ********************************************************************/ -static BOOL smb_io_notify_option(char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth) +static BOOL smb_io_notify_option(const char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "smb_io_notify_option"); depth++; @@ -320,7 +320,7 @@ static BOOL smb_io_notify_option(char *desc, SPOOL_NOTIFY_OPTION *option, prs_st reads or writes an NOTIFY INFO DATA structure. ********************************************************************/ -static BOOL smb_io_notify_info_data(char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth) +static BOOL smb_io_notify_info_data(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth) { uint32 useless_ptr=0x0FF0ADDE; @@ -399,7 +399,7 @@ static BOOL smb_io_notify_info_data(char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs reads or writes an NOTIFY INFO DATA structure. ********************************************************************/ -BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data, +BOOL smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "smb_io_notify_info_data_strings"); @@ -530,7 +530,7 @@ BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data, reads or writes an NOTIFY INFO structure. ********************************************************************/ -static BOOL smb_io_notify_info(char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *ps, int depth) +static BOOL smb_io_notify_info(const char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *ps, int depth) { int i; @@ -566,7 +566,7 @@ static BOOL smb_io_notify_info(char *desc, SPOOL_NOTIFY_INFO *info, prs_struct * /******************************************************************* ********************************************************************/ -static BOOL spool_io_user_level_1(char *desc, SPOOL_USER_1 *q_u, prs_struct *ps, int depth) +static BOOL spool_io_user_level_1(const char *desc, SPOOL_USER_1 *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, ""); depth++; @@ -605,7 +605,7 @@ static BOOL spool_io_user_level_1(char *desc, SPOOL_USER_1 *q_u, prs_struct *ps, /******************************************************************* ********************************************************************/ -static BOOL spool_io_user_level(char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, int depth) +static BOOL spool_io_user_level(const char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, int depth) { if (q_u==NULL) return False; @@ -643,7 +643,7 @@ static BOOL spool_io_user_level(char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, #define DM_NUM_OPTIONAL_FIELDS 8 -BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode) +BOOL spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode) { uint32 available_space; /* size of the device mode left to parse */ /* only important on unmarshalling */ @@ -829,7 +829,7 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo Read or write a DEVICEMODE container ********************************************************************/ -static BOOL spoolss_io_devmode_cont(char *desc, DEVMODE_CTR *dm_c, prs_struct *ps, int depth) +static BOOL spoolss_io_devmode_cont(const char *desc, DEVMODE_CTR *dm_c, prs_struct *ps, int depth) { if (dm_c==NULL) return False; @@ -874,7 +874,7 @@ static BOOL spoolss_io_devmode_cont(char *desc, DEVMODE_CTR *dm_c, prs_struct *p /******************************************************************* ********************************************************************/ -static BOOL spoolss_io_printer_default(char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth) +static BOOL spoolss_io_printer_default(const char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth) { if (pd==NULL) return False; @@ -1059,7 +1059,7 @@ BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 * called from spoolss_q_open_printer_ex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1090,7 +1090,7 @@ BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct * called from spoolss_open_printer_ex (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -1115,7 +1115,7 @@ BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct * called from spoolss_q_open_printer_ex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1151,7 +1151,7 @@ BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_ * called from spoolss_open_printer_ex (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -1240,7 +1240,7 @@ BOOL make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u, * called from spoolss_q_getprinterdata (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_getprinterdata(char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1269,7 +1269,7 @@ BOOL spoolss_io_q_getprinterdata(char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_st * called from spoolss_q_deleteprinterdata (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_deleteprinterdata(char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1294,7 +1294,7 @@ BOOL spoolss_io_q_deleteprinterdata(char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, * called from spoolss_r_deleteprinterdata (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_deleteprinterdata(char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdata"); depth++; @@ -1309,7 +1309,7 @@ BOOL spoolss_io_r_deleteprinterdata(char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, * called from spoolss_q_deleteprinterdataex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_deleteprinterdataex(char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1335,7 +1335,7 @@ BOOL spoolss_io_q_deleteprinterdataex(char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q * called from spoolss_r_deleteprinterdataex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_deleteprinterdataex(char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdataex"); depth++; @@ -1351,7 +1351,7 @@ BOOL spoolss_io_r_deleteprinterdataex(char *desc, SPOOL_R_DELETEPRINTERDATAEX *r * called from spoolss_r_getprinterdata (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_getprinterdata(char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -1407,7 +1407,7 @@ BOOL make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd) * called from spoolss_abortprinter (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_abortprinter(char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1428,7 +1428,7 @@ BOOL spoolss_io_q_abortprinter(char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct * called from spoolss_r_abortprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_abortprinter(char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_abortprinter"); depth++; @@ -1444,7 +1444,7 @@ BOOL spoolss_io_r_abortprinter(char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct * called from spoolss_deleteprinter (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_deleteprinter(char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1466,7 +1466,7 @@ BOOL spoolss_io_q_deleteprinter(char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_stru * called from spoolss_deleteprinter (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_deleteprinter(char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinter"); depth++; @@ -1489,7 +1489,7 @@ BOOL spoolss_io_r_deleteprinter(char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_stru * called from spoolss_deleteprinterdriver (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_deleteprinterdriver(char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1516,7 +1516,7 @@ BOOL spoolss_io_q_deleteprinterdriver(char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q /******************************************************************* * write a structure. ********************************************************************/ -BOOL spoolss_io_r_deleteprinterdriver(char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -1539,7 +1539,7 @@ BOOL spoolss_io_r_deleteprinterdriver(char *desc, SPOOL_R_DELETEPRINTERDRIVER *r * called from spoolss_deleteprinterdriver (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_deleteprinterdriverex(char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1574,7 +1574,7 @@ BOOL spoolss_io_q_deleteprinterdriverex(char *desc, SPOOL_Q_DELETEPRINTERDRIVERE /******************************************************************* * write a structure. ********************************************************************/ -BOOL spoolss_io_r_deleteprinterdriverex(char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -1598,7 +1598,7 @@ BOOL spoolss_io_r_deleteprinterdriverex(char *desc, SPOOL_R_DELETEPRINTERDRIVERE * called from spoolss_closeprinter (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_closeprinter(char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1620,7 +1620,7 @@ BOOL spoolss_io_q_closeprinter(char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct * called from spoolss_closeprinter (cli_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_closeprinter(char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_closeprinter"); depth++; @@ -1641,7 +1641,7 @@ BOOL spoolss_io_r_closeprinter(char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct * called from spoolss_q_startdocprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_startdocprinter(char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1665,7 +1665,7 @@ BOOL spoolss_io_q_startdocprinter(char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_ * called from spoolss_r_startdocprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_startdocprinter(char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_startdocprinter"); depth++; @@ -1682,7 +1682,7 @@ BOOL spoolss_io_r_startdocprinter(char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_ * called from spoolss_q_enddocprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_enddocprinter(char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1703,7 +1703,7 @@ BOOL spoolss_io_q_enddocprinter(char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_stru * called from spoolss_r_enddocprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_enddocprinter(char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enddocprinter"); depth++; @@ -1718,7 +1718,7 @@ BOOL spoolss_io_r_enddocprinter(char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_stru * called from spoolss_q_startpageprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_startpageprinter(char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1739,7 +1739,7 @@ BOOL spoolss_io_q_startpageprinter(char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, pr * called from spoolss_r_startpageprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_startpageprinter(char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_startpageprinter"); depth++; @@ -1754,7 +1754,7 @@ BOOL spoolss_io_r_startpageprinter(char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, pr * called from spoolss_q_endpageprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_endpageprinter(char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1775,7 +1775,7 @@ BOOL spoolss_io_q_endpageprinter(char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_st * called from spoolss_r_endpageprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_endpageprinter(char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_endpageprinter"); depth++; @@ -1790,7 +1790,7 @@ BOOL spoolss_io_r_endpageprinter(char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_st * called from spoolss_q_writeprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_writeprinter(char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -1827,7 +1827,7 @@ BOOL spoolss_io_q_writeprinter(char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct * called from spoolss_r_writeprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_writeprinter(char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_writeprinter"); depth++; @@ -1844,7 +1844,7 @@ BOOL spoolss_io_r_writeprinter(char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct * called from spoolss_q_rffpcnex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_rffpcnex(char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_rffpcnex"); depth++; @@ -1890,7 +1890,7 @@ BOOL spoolss_io_q_rffpcnex(char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, in * called from spoolss_r_rffpcnex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_rffpcnex(char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_rffpcnex"); depth++; @@ -1906,7 +1906,7 @@ BOOL spoolss_io_r_rffpcnex(char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, in * called from spoolss_q_rfnpcnex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_rfnpcnex(char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_rfnpcnex"); depth++; @@ -1941,7 +1941,7 @@ BOOL spoolss_io_q_rfnpcnex(char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, in * called from spoolss_r_rfnpcnex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_rfnpcnex(char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_rfnpcnex"); depth++; @@ -2061,7 +2061,7 @@ static uint32 size_of_systemtime(SYSTEMTIME *systime) * ********************************************************************/ -static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *string) +static BOOL smb_io_relstr(const char *desc, NEW_BUFFER *buffer, int depth, UNISTR *string) { prs_struct *ps=&buffer->prs; @@ -2123,7 +2123,7 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str * used by 2 RPC structs ********************************************************************/ -static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 **string) +static BOOL smb_io_relarraystr(const char *desc, NEW_BUFFER *buffer, int depth, uint16 **string) { UNISTR chaine; @@ -2251,7 +2251,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 Parse a DEVMODE structure and its relative pointer. ********************************************************************/ -static BOOL smb_io_relsecdesc(char *desc, NEW_BUFFER *buffer, int depth, SEC_DESC **secdesc) +static BOOL smb_io_relsecdesc(const char *desc, NEW_BUFFER *buffer, int depth, SEC_DESC **secdesc) { prs_struct *ps= &buffer->prs; @@ -2312,7 +2312,7 @@ static BOOL smb_io_relsecdesc(char *desc, NEW_BUFFER *buffer, int depth, SEC_DES Parse a DEVMODE structure and its relative pointer. ********************************************************************/ -static BOOL smb_io_reldevmode(char *desc, NEW_BUFFER *buffer, int depth, DEVICEMODE **devmode) +static BOOL smb_io_reldevmode(const char *desc, NEW_BUFFER *buffer, int depth, DEVICEMODE **devmode) { prs_struct *ps=&buffer->prs; @@ -2380,7 +2380,7 @@ static BOOL smb_io_reldevmode(char *desc, NEW_BUFFER *buffer, int depth, DEVICEM Parse a PRINTER_INFO_0 structure. ********************************************************************/ -BOOL smb_io_printer_info_0(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info, int depth) +BOOL smb_io_printer_info_0(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2481,7 +2481,7 @@ BOOL smb_io_printer_info_0(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info, Parse a PRINTER_INFO_1 structure. ********************************************************************/ -BOOL smb_io_printer_info_1(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info, int depth) +BOOL smb_io_printer_info_1(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2506,7 +2506,7 @@ BOOL smb_io_printer_info_1(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info, Parse a PRINTER_INFO_2 structure. ********************************************************************/ -BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info, int depth) +BOOL smb_io_printer_info_2(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info, int depth) { prs_struct *ps=&buffer->prs; uint32 dm_offset, sd_offset, current_offset; @@ -2597,7 +2597,7 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info, Parse a PRINTER_INFO_3 structure. ********************************************************************/ -BOOL smb_io_printer_info_3(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info, int depth) +BOOL smb_io_printer_info_3(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2618,7 +2618,7 @@ BOOL smb_io_printer_info_3(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info, Parse a PRINTER_INFO_4 structure. ********************************************************************/ -BOOL smb_io_printer_info_4(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info, int depth) +BOOL smb_io_printer_info_4(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2640,7 +2640,7 @@ BOOL smb_io_printer_info_4(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info, Parse a PRINTER_INFO_5 structure. ********************************************************************/ -BOOL smb_io_printer_info_5(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info, int depth) +BOOL smb_io_printer_info_5(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2666,7 +2666,7 @@ BOOL smb_io_printer_info_5(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info, Parse a PRINTER_INFO_7 structure. ********************************************************************/ -BOOL smb_io_printer_info_7(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_7 *info, int depth) +BOOL smb_io_printer_info_7(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_7 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2686,7 +2686,7 @@ BOOL smb_io_printer_info_7(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_7 *info, Parse a PORT_INFO_1 structure. ********************************************************************/ -BOOL smb_io_port_info_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth) +BOOL smb_io_port_info_1(const char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2705,7 +2705,7 @@ BOOL smb_io_port_info_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int d Parse a PORT_INFO_2 structure. ********************************************************************/ -BOOL smb_io_port_info_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth) +BOOL smb_io_port_info_2(const char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2732,7 +2732,7 @@ BOOL smb_io_port_info_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int d Parse a DRIVER_INFO_1 structure. ********************************************************************/ -BOOL smb_io_printer_driver_info_1(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1 *info, int depth) +BOOL smb_io_printer_driver_info_1(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2751,7 +2751,7 @@ BOOL smb_io_printer_driver_info_1(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1 Parse a DRIVER_INFO_2 structure. ********************************************************************/ -BOOL smb_io_printer_driver_info_2(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2 *info, int depth) +BOOL smb_io_printer_driver_info_2(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2780,7 +2780,7 @@ BOOL smb_io_printer_driver_info_2(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2 Parse a DRIVER_INFO_3 structure. ********************************************************************/ -BOOL smb_io_printer_driver_info_3(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3 *info, int depth) +BOOL smb_io_printer_driver_info_3(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2819,7 +2819,7 @@ BOOL smb_io_printer_driver_info_3(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3 Parse a DRIVER_INFO_6 structure. ********************************************************************/ -BOOL smb_io_printer_driver_info_6(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6 *info, int depth) +BOOL smb_io_printer_driver_info_6(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2884,7 +2884,7 @@ BOOL smb_io_printer_driver_info_6(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6 Parse a JOB_INFO_1 structure. ********************************************************************/ -BOOL smb_io_job_info_1(char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int depth) +BOOL smb_io_job_info_1(const char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -2927,7 +2927,7 @@ BOOL smb_io_job_info_1(char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int dep Parse a JOB_INFO_2 structure. ********************************************************************/ -BOOL smb_io_job_info_2(char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int depth) +BOOL smb_io_job_info_2(const char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int depth) { uint32 pipo=0; prs_struct *ps=&buffer->prs; @@ -2994,7 +2994,7 @@ BOOL smb_io_job_info_2(char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int dep /******************************************************************* ********************************************************************/ -BOOL smb_io_form_1(char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth) +BOOL smb_io_form_1(const char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3029,7 +3029,7 @@ BOOL smb_io_form_1(char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth) Read/write a BUFFER struct. ********************************************************************/ -static BOOL spoolss_io_buffer(char *desc, prs_struct *ps, int depth, NEW_BUFFER **pp_buffer) +static BOOL spoolss_io_buffer(const char *desc, prs_struct *ps, int depth, NEW_BUFFER **pp_buffer) { NEW_BUFFER *buffer = *pp_buffer; @@ -3141,7 +3141,7 @@ uint32 new_get_buffer_size(NEW_BUFFER *buffer) Parse a DRIVER_DIRECTORY_1 structure. ********************************************************************/ -BOOL smb_io_driverdir_1(char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth) +BOOL smb_io_driverdir_1(const char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3160,7 +3160,7 @@ BOOL smb_io_driverdir_1(char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info Parse a PORT_INFO_1 structure. ********************************************************************/ -BOOL smb_io_port_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth) +BOOL smb_io_port_1(const char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3179,7 +3179,7 @@ BOOL smb_io_port_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth) Parse a PORT_INFO_2 structure. ********************************************************************/ -BOOL smb_io_port_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth) +BOOL smb_io_port_2(const char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3205,7 +3205,7 @@ BOOL smb_io_port_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth) /******************************************************************* ********************************************************************/ -BOOL smb_io_printprocessor_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth) +BOOL smb_io_printprocessor_info_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3223,7 +3223,7 @@ BOOL smb_io_printprocessor_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR /******************************************************************* ********************************************************************/ -BOOL smb_io_printprocdatatype_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth) +BOOL smb_io_printprocdatatype_info_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3241,7 +3241,7 @@ BOOL smb_io_printprocdatatype_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCDA /******************************************************************* ********************************************************************/ -BOOL smb_io_printmonitor_info_1(char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 *info, int depth) +BOOL smb_io_printmonitor_info_1(const char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3259,7 +3259,7 @@ BOOL smb_io_printmonitor_info_1(char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 * /******************************************************************* ********************************************************************/ -BOOL smb_io_printmonitor_info_2(char *desc, NEW_BUFFER *buffer, PRINTMONITOR_2 *info, int depth) +BOOL smb_io_printmonitor_info_2(const char *desc, NEW_BUFFER *buffer, PRINTMONITOR_2 *info, int depth) { prs_struct *ps=&buffer->prs; @@ -3806,7 +3806,7 @@ BOOL make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, * called from spoolss_getprinterdriver2 (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdriver2"); depth++; @@ -3848,7 +3848,7 @@ BOOL spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, * called from spoolss_getprinterdriver2 (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_getprinterdriver2(char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdriver2"); depth++; @@ -3921,7 +3921,7 @@ BOOL make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u, * called from spoolss_enumprinters (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_enumprinters(char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprinters"); depth++; @@ -3957,7 +3957,7 @@ BOOL spoolss_io_q_enumprinters(char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct Parse a SPOOL_R_ENUMPRINTERS structure. ********************************************************************/ -BOOL spoolss_io_r_enumprinters(char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprinters"); depth++; @@ -3989,7 +3989,7 @@ BOOL spoolss_io_r_enumprinters(char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct * ********************************************************************/ -BOOL spoolss_io_r_getprinter(char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_getprinter"); depth++; @@ -4017,7 +4017,7 @@ BOOL spoolss_io_r_getprinter(char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps * called from spoolss_getprinter (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_getprinter(char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_getprinter"); depth++; @@ -4129,7 +4129,7 @@ BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_setprinter"); depth++; @@ -4147,7 +4147,7 @@ BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps Marshall/unmarshall a SPOOL_Q_SETPRINTER struct. ********************************************************************/ -BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth) { uint32 ptr_sec_desc = 0; @@ -4210,7 +4210,7 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_fcpn"); depth++; @@ -4227,7 +4227,7 @@ BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth) /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_fcpn(char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_fcpn"); @@ -4246,7 +4246,7 @@ BOOL spoolss_io_q_fcpn(char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth) /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_addjob(char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, ""); depth++; @@ -4272,7 +4272,7 @@ BOOL spoolss_io_r_addjob(char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int de /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_addjob(char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, ""); depth++; @@ -4300,7 +4300,7 @@ BOOL spoolss_io_q_addjob(char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int de /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_enumjobs(char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumjobs"); depth++; @@ -4352,7 +4352,7 @@ BOOL make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_enumjobs(char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumjobs"); depth++; @@ -4385,7 +4385,7 @@ BOOL spoolss_io_q_enumjobs(char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, in /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_schedulejob(char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_schedulejob"); depth++; @@ -4402,7 +4402,7 @@ BOOL spoolss_io_r_schedulejob(char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct * /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_schedulejob(char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_schedulejob"); depth++; @@ -4421,7 +4421,7 @@ BOOL spoolss_io_q_schedulejob(char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct * /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_setjob(char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_setjob"); depth++; @@ -4438,7 +4438,7 @@ BOOL spoolss_io_r_setjob(char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int de /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_setjob(char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_setjob"); depth++; @@ -4466,7 +4466,7 @@ BOOL spoolss_io_q_setjob(char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int de Parse a SPOOL_R_ENUMPRINTERDRIVERS structure. ********************************************************************/ -BOOL spoolss_io_r_enumprinterdrivers(char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdrivers"); depth++; @@ -4516,7 +4516,7 @@ BOOL make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u, Parse a SPOOL_Q_ENUMPRINTERDRIVERS structure. ********************************************************************/ -BOOL spoolss_io_q_enumprinterdrivers(char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdrivers"); @@ -4557,7 +4557,7 @@ BOOL spoolss_io_q_enumprinterdrivers(char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_enumforms(char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumforms"); @@ -4584,7 +4584,7 @@ BOOL spoolss_io_q_enumforms(char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_enumforms(char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumforms"); depth++; @@ -4613,7 +4613,7 @@ BOOL spoolss_io_r_enumforms(char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_getform(char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_getform"); @@ -4646,7 +4646,7 @@ BOOL spoolss_io_q_getform(char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_getform(char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_getform"); depth++; @@ -4673,7 +4673,7 @@ BOOL spoolss_io_r_getform(char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int Parse a SPOOL_R_ENUMPORTS structure. ********************************************************************/ -BOOL spoolss_io_r_enumports(char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumports"); depth++; @@ -4702,7 +4702,7 @@ BOOL spoolss_io_r_enumports(char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_enumports(char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, ""); depth++; @@ -4735,7 +4735,7 @@ BOOL spoolss_io_q_enumports(char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, Parse a SPOOL_PRINTER_INFO_LEVEL_1 structure. ********************************************************************/ -BOOL spool_io_printer_info_level_1(char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth) +BOOL spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spool_io_printer_info_level_1"); depth++; @@ -4766,7 +4766,7 @@ BOOL spool_io_printer_info_level_1(char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, p Parse a SPOOL_PRINTER_INFO_LEVEL_3 structure. ********************************************************************/ -BOOL spool_io_printer_info_level_3(char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth) +BOOL spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spool_io_printer_info_level_3"); depth++; @@ -4784,7 +4784,7 @@ BOOL spool_io_printer_info_level_3(char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, p Parse a SPOOL_PRINTER_INFO_LEVEL_2 structure. ********************************************************************/ -BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth) +BOOL spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spool_io_printer_info_level_2"); depth++; @@ -4863,7 +4863,7 @@ BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, p return True; } -BOOL spool_io_printer_info_level_7(char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth) +BOOL spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spool_io_printer_info_level_7"); depth++; @@ -4884,7 +4884,7 @@ BOOL spool_io_printer_info_level_7(char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, p /******************************************************************* ********************************************************************/ -BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth) +BOOL spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spool_io_printer_info_level"); depth++; @@ -4961,7 +4961,7 @@ BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_s /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth) { uint32 ptr_sec_desc = 0; @@ -5025,7 +5025,7 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_addprinterex(char *desc, SPOOL_R_ADDPRINTEREX *r_u, +BOOL spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_addprinterex"); @@ -5043,7 +5043,7 @@ BOOL spoolss_io_r_addprinterex(char *desc, SPOOL_R_ADDPRINTEREX *r_u, /******************************************************************* ********************************************************************/ -BOOL spool_io_printer_driver_info_level_3(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, +BOOL spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, prs_struct *ps, int depth) { SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *il; @@ -5121,7 +5121,7 @@ BOOL spool_io_printer_driver_info_level_3(char *desc, SPOOL_PRINTER_DRIVER_INFO_ parse a SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure ********************************************************************/ -BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, +BOOL spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, prs_struct *ps, int depth) { SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *il; @@ -5312,7 +5312,7 @@ static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar) and size of array at beginning ********************************************************************/ -BOOL smb_io_unibuffer(char *desc, UNISTR2 *buffer, prs_struct *ps, int depth) +BOOL smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth) { if (buffer==NULL) return False; @@ -5331,7 +5331,7 @@ BOOL smb_io_unibuffer(char *desc, UNISTR2 *buffer, prs_struct *ps, int depth) /******************************************************************* ********************************************************************/ -BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth) +BOOL spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spool_io_printer_driver_info_level"); depth++; @@ -5480,7 +5480,7 @@ BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 fill in the prs_struct for a ADDPRINTERDRIVER request PDU ********************************************************************/ -BOOL spoolss_io_q_addprinterdriver(char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriver"); depth++; @@ -5507,7 +5507,7 @@ BOOL spoolss_io_q_addprinterdriver(char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, pr /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriver"); depth++; @@ -5522,7 +5522,7 @@ BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, pr fill in the prs_struct for a ADDPRINTERDRIVER request PDU ********************************************************************/ -BOOL spoolss_io_q_addprinterdriverex(char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriverex"); depth++; @@ -5554,7 +5554,7 @@ BOOL spoolss_io_q_addprinterdriverex(char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_addprinterdriverex(char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriverex"); depth++; @@ -5737,7 +5737,7 @@ BOOL make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u, Parse a SPOOL_Q_GETPRINTERDRIVERDIR structure. ********************************************************************/ -BOOL spoolss_io_q_getprinterdriverdir(char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdriverdir"); depth++; @@ -5779,7 +5779,7 @@ BOOL spoolss_io_q_getprinterdriverdir(char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q Parse a SPOOL_R_GETPRINTERDRIVERDIR structure. ********************************************************************/ -BOOL spoolss_io_r_getprinterdriverdir(char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdriverdir"); depth++; @@ -5805,7 +5805,7 @@ BOOL spoolss_io_r_getprinterdriverdir(char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_enumprintprocessors(char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprintprocessors"); depth++; @@ -5834,7 +5834,7 @@ BOOL spoolss_io_r_enumprintprocessors(char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_enumprintprocessors(char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprintprocessors"); depth++; @@ -5876,7 +5876,7 @@ BOOL spoolss_io_q_enumprintprocessors(char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_addprintprocessor(char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_addprintprocessor"); depth++; @@ -5910,7 +5910,7 @@ BOOL spoolss_io_q_addprintprocessor(char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_addprintprocessor(char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_addprintproicessor"); depth++; @@ -5927,7 +5927,7 @@ BOOL spoolss_io_r_addprintprocessor(char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_enumprintprocdatatypes(char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprintprocdatatypes"); depth++; @@ -5956,7 +5956,7 @@ BOOL spoolss_io_r_enumprintprocdatatypes(char *desc, SPOOL_R_ENUMPRINTPROCDATATY /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_enumprintprocdatatypes(char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprintprocdatatypes"); depth++; @@ -5999,7 +5999,7 @@ BOOL spoolss_io_q_enumprintprocdatatypes(char *desc, SPOOL_Q_ENUMPRINTPROCDATATY Parse a SPOOL_Q_ENUMPRINTMONITORS structure. ********************************************************************/ -BOOL spoolss_io_q_enumprintmonitors(char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprintmonitors"); depth++; @@ -6033,7 +6033,7 @@ BOOL spoolss_io_q_enumprintmonitors(char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_enumprintmonitors(char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprintmonitors"); depth++; @@ -6062,7 +6062,7 @@ BOOL spoolss_io_r_enumprintmonitors(char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdata"); depth++; @@ -6119,7 +6119,7 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_ /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_enumprinterdata(char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdata"); depth++; @@ -6157,7 +6157,7 @@ BOOL make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u, ********************************************************************/ BOOL make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u, - const POLICY_HND *hnd, char *key, + const POLICY_HND *hnd, const char *key, uint32 size) { memcpy(&q_u->handle, hnd, sizeof(q_u->handle)); @@ -6202,7 +6202,7 @@ BOOL make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_setprinterdata"); depth++; @@ -6251,7 +6251,7 @@ BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_st /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_setprinterdata"); depth++; @@ -6266,7 +6266,7 @@ BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_st /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_resetprinter"); depth++; @@ -6293,7 +6293,7 @@ BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_resetprinter"); depth++; @@ -6309,7 +6309,7 @@ BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct /******************************************************************* ********************************************************************/ -static BOOL spoolss_io_addform(char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth) +static BOOL spoolss_io_addform(const char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_addform"); depth++; @@ -6345,7 +6345,7 @@ static BOOL spoolss_io_addform(char *desc, FORM *f, uint32 ptr, prs_struct *ps, /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_deleteform(char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_deleteform"); depth++; @@ -6363,7 +6363,7 @@ BOOL spoolss_io_q_deleteform(char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_deleteform"); depth++; @@ -6379,7 +6379,7 @@ BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth) { uint32 useless_ptr=1; prs_debug(ps, depth, desc, "spoolss_io_q_addform"); @@ -6408,7 +6408,7 @@ BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_addform"); depth++; @@ -6424,7 +6424,7 @@ BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int /******************************************************************* ********************************************************************/ -BOOL spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth) { uint32 useless_ptr=1; prs_debug(ps, depth, desc, "spoolss_io_q_setform"); @@ -6459,7 +6459,7 @@ BOOL spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int /******************************************************************* ********************************************************************/ -BOOL spoolss_io_r_setform(char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_setform"); depth++; @@ -6476,7 +6476,7 @@ BOOL spoolss_io_r_setform(char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int Parse a SPOOL_R_GETJOB structure. ********************************************************************/ -BOOL spoolss_io_r_getjob(char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_getjob"); depth++; @@ -6503,7 +6503,7 @@ BOOL spoolss_io_r_getjob(char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int de Parse a SPOOL_Q_GETJOB structure. ********************************************************************/ -BOOL spoolss_io_q_getjob(char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, ""); depth++; @@ -6603,7 +6603,7 @@ BOOL make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u, Parse a SPOOL_Q_REPLYOPENPRINTER structure. ********************************************************************/ -BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_replyopenprinter"); depth++; @@ -6634,7 +6634,7 @@ BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, pr Parse a SPOOL_R_REPLYOPENPRINTER structure. ********************************************************************/ -BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_replyopenprinter"); depth++; @@ -6674,7 +6674,7 @@ BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_H /******************************************************************* Parse a SPOOL_Q_ROUTERREPLYPRINTER structure. ********************************************************************/ -BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_routerreplyprinter"); @@ -6704,7 +6704,7 @@ BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_ /******************************************************************* Parse a SPOOL_R_ROUTERREPLYPRINTER structure. ********************************************************************/ -BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_routerreplyprinter"); depth++; @@ -6736,7 +6736,7 @@ BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HN Parse a SPOOL_Q_REPLYCLOSEPRINTER structure. ********************************************************************/ -BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_replycloseprinter"); depth++; @@ -6754,7 +6754,7 @@ BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, Parse a SPOOL_R_REPLYCLOSEPRINTER structure. ********************************************************************/ -BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter"); depth++; @@ -6881,7 +6881,7 @@ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, Parse a SPOOL_Q_REPLY_RRPCN structure. ********************************************************************/ -BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_reply_rrpcn"); depth++; @@ -6918,7 +6918,7 @@ BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct * Parse a SPOOL_R_REPLY_RRPCN structure. ********************************************************************/ -BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_reply_rrpcn"); depth++; @@ -6940,7 +6940,7 @@ BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct * * called from spoolss_q_getprinterdataex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_q_getprinterdataex(char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -6973,7 +6973,7 @@ BOOL spoolss_io_q_getprinterdataex(char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, pr * called from spoolss_r_getprinterdataex (srv_spoolss.c) ********************************************************************/ -BOOL spoolss_io_r_getprinterdataex(char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -7012,7 +7012,7 @@ BOOL spoolss_io_r_getprinterdataex(char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, pr * read a structure. ********************************************************************/ -BOOL spoolss_io_q_setprinterdataex(char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_setprinterdataex"); depth++; @@ -7068,7 +7068,7 @@ BOOL spoolss_io_q_setprinterdataex(char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, pr * write a structure. ********************************************************************/ -BOOL spoolss_io_r_setprinterdataex(char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_setprinterdataex"); depth++; @@ -7085,7 +7085,8 @@ BOOL spoolss_io_r_setprinterdataex(char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, pr * read a structure. ********************************************************************/ BOOL make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, - POLICY_HND *hnd, char *key, uint32 size) + POLICY_HND *hnd, const char *key, + uint32 size) { DEBUG(5,("make_spoolss_q_enumprinterkey\n")); @@ -7100,7 +7101,7 @@ BOOL make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, * read a structure. ********************************************************************/ -BOOL spoolss_io_q_enumprinterkey(char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterkey"); depth++; @@ -7126,7 +7127,7 @@ BOOL spoolss_io_q_enumprinterkey(char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_st * write a structure. ********************************************************************/ -BOOL spoolss_io_r_enumprinterkey(char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterkey"); depth++; @@ -7168,7 +7169,7 @@ BOOL make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u, * read a structure. ********************************************************************/ -BOOL spoolss_io_q_deleteprinterkey(char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterkey"); depth++; @@ -7188,7 +7189,7 @@ BOOL spoolss_io_q_deleteprinterkey(char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, pr * write a structure. ********************************************************************/ -BOOL spoolss_io_r_deleteprinterkey(char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterkey"); depth++; @@ -7207,7 +7208,7 @@ BOOL spoolss_io_r_deleteprinterkey(char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, pr * read a structure. ********************************************************************/ -BOOL spoolss_io_q_enumprinterdataex(char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdataex"); depth++; @@ -7232,7 +7233,7 @@ BOOL spoolss_io_q_enumprinterdataex(char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, /******************************************************************* ********************************************************************/ -static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps, +static BOOL spoolss_io_printer_enum_values_ctr(const char *desc, prs_struct *ps, PRINTER_ENUM_VALUES_CTR *ctr, int depth) { int i; @@ -7315,7 +7316,7 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps, * write a structure. ********************************************************************/ -BOOL spoolss_io_r_enumprinterdataex(char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth) { uint32 data_offset, end_offset; prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdataex"); @@ -7392,7 +7393,7 @@ BOOL make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTOR return True; } -BOOL spoolss_io_q_getprintprocessordirectory(char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth) +BOOL spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth) { uint32 ptr; @@ -7444,7 +7445,7 @@ BOOL spoolss_io_q_getprintprocessordirectory(char *desc, SPOOL_Q_GETPRINTPROCESS * write a structure. ********************************************************************/ -BOOL spoolss_io_r_getprintprocessordirectory(char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth) +BOOL spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "spoolss_io_r_getprintprocessordirectory"); depth++; @@ -7467,7 +7468,7 @@ BOOL spoolss_io_r_getprintprocessordirectory(char *desc, SPOOL_R_GETPRINTPROCESS return True; } -BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth) +BOOL smb_io_printprocessordirectory_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth) { prs_struct *ps=&buffer->prs; diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index b3d33645b9..bfa1a13be9 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -32,7 +32,7 @@ Inits a SH_INFO_0_STR structure ********************************************************************/ -void init_srv_share_info0_str(SH_INFO_0_STR *sh0, char *net_name) +void init_srv_share_info0_str(SH_INFO_0_STR *sh0, const char *net_name) { DEBUG(5,("init_srv_share_info0_str\n")); @@ -44,7 +44,7 @@ void init_srv_share_info0_str(SH_INFO_0_STR *sh0, char *net_name) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info0_str(char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth) +static BOOL srv_io_share_info0_str(const char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth) { if (sh0 == NULL) return False; @@ -65,7 +65,7 @@ static BOOL srv_io_share_info0_str(char *desc, SH_INFO_0_STR *sh0, prs_struct *p makes a SH_INFO_0 structure ********************************************************************/ -void init_srv_share_info0(SH_INFO_0 *sh0, char *net_name) +void init_srv_share_info0(SH_INFO_0 *sh0, const char *net_name) { DEBUG(5,("init_srv_share_info0: %s\n", net_name)); @@ -76,7 +76,7 @@ void init_srv_share_info0(SH_INFO_0 *sh0, char *net_name) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info0(char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth) +static BOOL srv_io_share_info0(const char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth) { if (sh0 == NULL) return False; @@ -97,7 +97,7 @@ static BOOL srv_io_share_info0(char *desc, SH_INFO_0 *sh0, prs_struct *ps, int d Inits a SH_INFO_1_STR structure ********************************************************************/ -void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark) +void init_srv_share_info1_str(SH_INFO_1_STR *sh1, const char *net_name, const char *remark) { DEBUG(5,("init_srv_share_info1_str\n")); @@ -111,7 +111,7 @@ void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth) +static BOOL srv_io_share_info1_str(const char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth) { if (sh1 == NULL) return False; @@ -140,7 +140,7 @@ static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *p makes a SH_INFO_1 structure ********************************************************************/ -void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark) +void init_srv_share_info1(SH_INFO_1 *sh1, const char *net_name, uint32 type, const char *remark) { DEBUG(5,("init_srv_share_info1: %s %8x %s\n", net_name, type, remark)); @@ -153,7 +153,7 @@ void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *rem Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth) +static BOOL srv_io_share_info1(const char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth) { if (sh1 == NULL) return False; @@ -179,8 +179,8 @@ static BOOL srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int d ********************************************************************/ void init_srv_share_info2_str(SH_INFO_2_STR *sh2, - char *net_name, char *remark, - char *path, char *passwd) + const char *net_name, const char *remark, + const char *path, const char *passwd) { DEBUG(5,("init_srv_share_info2_str\n")); @@ -198,7 +198,7 @@ void init_srv_share_info2_str(SH_INFO_2_STR *sh2, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth) +static BOOL srv_io_share_info2_str(const char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth) { if (sh2 == NULL) return False; @@ -236,9 +236,9 @@ static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2 ********************************************************************/ void init_srv_share_info2(SH_INFO_2 *sh2, - char *net_name, uint32 type, char *remark, + const char *net_name, uint32 type, const char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, - char *path, char *passwd) + const char *path, const char *passwd) { DEBUG(5,("init_srv_share_info2: %s %8x %s\n", net_name, type, remark)); @@ -256,7 +256,7 @@ void init_srv_share_info2(SH_INFO_2 *sh2, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth) +static BOOL srv_io_share_info2(const char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth) { if (sh2 == NULL) return False; @@ -292,7 +292,7 @@ static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int d ********************************************************************/ void init_srv_share_info501_str(SH_INFO_501_STR *sh501, - char *net_name, char *remark) + const char *net_name, const char *remark) { DEBUG(5,("init_srv_share_info501_str\n")); @@ -306,7 +306,7 @@ void init_srv_share_info501_str(SH_INFO_501_STR *sh501, Inits a SH_INFO_2 structure *******************************************************************/ -void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, char *remark, uint32 csc_policy) +void init_srv_share_info501(SH_INFO_501 *sh501, const char *net_name, uint32 type, const char *remark, uint32 csc_policy) { DEBUG(5,("init_srv_share_info501: %s %8x %s %08x\n", net_name, type, remark, csc_policy)); @@ -323,7 +323,7 @@ void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, cha Reads of writes a structure. *******************************************************************/ -static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth) +static BOOL srv_io_share_info501(const char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth) { if (sh501 == NULL) return False; @@ -350,7 +350,7 @@ static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth) +static BOOL srv_io_share_info501_str(const char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth) { if (sh501 == NULL) return False; @@ -376,9 +376,9 @@ static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_str ********************************************************************/ void init_srv_share_info502(SH_INFO_502 *sh502, - const char *net_name, uint32 type, char *remark, + const char *net_name, uint32 type, const char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, - char *path, char *passwd, SEC_DESC *psd, size_t sd_size) + const char *path, const char *passwd, SEC_DESC *psd, size_t sd_size) { DEBUG(5,("init_srv_share_info502: %s %8x %s\n", net_name, type, remark)); @@ -401,7 +401,7 @@ void init_srv_share_info502(SH_INFO_502 *sh502, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info502(char *desc, SH_INFO_502 *sh502, prs_struct *ps, int depth) +static BOOL srv_io_share_info502(const char *desc, SH_INFO_502 *sh502, prs_struct *ps, int depth) { if (sh502 == NULL) return False; @@ -441,8 +441,8 @@ static BOOL srv_io_share_info502(char *desc, SH_INFO_502 *sh502, prs_struct *ps, ********************************************************************/ void init_srv_share_info502_str(SH_INFO_502_STR *sh502str, - char *net_name, char *remark, - char *path, char *passwd, SEC_DESC *psd, size_t sd_size) + const char *net_name, const char *remark, + const char *path, const char *passwd, SEC_DESC *psd, size_t sd_size) { DEBUG(5,("init_srv_share_info502_str\n")); @@ -463,7 +463,7 @@ void init_srv_share_info502_str(SH_INFO_502_STR *sh502str, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info502_str(char *desc, SH_INFO_502_STR *sh502, prs_struct *ps, int depth) +static BOOL srv_io_share_info502_str(const char *desc, SH_INFO_502_STR *sh502, prs_struct *ps, int depth) { if (sh502 == NULL) return False; @@ -547,7 +547,7 @@ static BOOL srv_io_share_info502_str(char *desc, SH_INFO_502_STR *sh502, prs_str Inits a SH_INFO_1004_STR structure ********************************************************************/ -void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, char *remark) +void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, const char *remark) { DEBUG(5,("init_srv_share_info1004_str\n")); @@ -559,7 +559,7 @@ void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, char *remark) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1004_str(char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth) +static BOOL srv_io_share_info1004_str(const char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth) { if (sh1004 == NULL) return False; @@ -580,7 +580,7 @@ static BOOL srv_io_share_info1004_str(char *desc, SH_INFO_1004_STR *sh1004, prs_ makes a SH_INFO_1004 structure ********************************************************************/ -void init_srv_share_info1004(SH_INFO_1004 *sh1004, char *remark) +void init_srv_share_info1004(SH_INFO_1004 *sh1004, const char *remark) { DEBUG(5,("init_srv_share_info1004: %s\n", remark)); @@ -591,7 +591,7 @@ void init_srv_share_info1004(SH_INFO_1004 *sh1004, char *remark) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1004(char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth) +static BOOL srv_io_share_info1004(const char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth) { if (sh1004 == NULL) return False; @@ -612,7 +612,7 @@ static BOOL srv_io_share_info1004(char *desc, SH_INFO_1004 *sh1004, prs_struct * Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth) +static BOOL srv_io_share_info1005(const char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth) { if(sh1005 == NULL) return False; @@ -633,7 +633,7 @@ static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, prs_s Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1006(char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth) +static BOOL srv_io_share_info1006(const char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth) { if(sh1006 == NULL) return False; @@ -666,7 +666,7 @@ void init_srv_share_info1007_str(SH_INFO_1007_STR *sh1007, const char *alternate Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1007_str(char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth) +static BOOL srv_io_share_info1007_str(const char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth) { if (sh1007 == NULL) return False; @@ -699,7 +699,7 @@ void init_srv_share_info1007(SH_INFO_1007 *sh1007, uint32 flags, const char *alt Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1007(char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth) +static BOOL srv_io_share_info1007(const char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth) { if (sh1007 == NULL) return False; @@ -722,7 +722,7 @@ static BOOL srv_io_share_info1007(char *desc, SH_INFO_1007 *sh1007, prs_struct * Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1501(char* desc, SRV_SHARE_INFO_1501* sh1501, +static BOOL srv_io_share_info1501(const char* desc, SRV_SHARE_INFO_1501* sh1501, prs_struct* ps, int depth) { if(sh1501 == NULL) @@ -744,7 +744,7 @@ static BOOL srv_io_share_info1501(char* desc, SRV_SHARE_INFO_1501* sh1501, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth) +static BOOL srv_io_srv_share_ctr(const char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth) { if (ctr == NULL) return False; @@ -1045,7 +1045,7 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct ********************************************************************/ void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n, - char *srv_name, uint32 info_level, + const char *srv_name, uint32 info_level, uint32 preferred_len, ENUM_HND *hnd) { @@ -1067,7 +1067,7 @@ void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_share_enum(const char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1102,7 +1102,7 @@ BOOL srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct * Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_enum(const char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -1151,7 +1151,7 @@ BOOL init_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO *q_n, const char *sr Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_share_get_info(char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_share_get_info(const char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1183,7 +1183,7 @@ BOOL srv_io_q_net_share_get_info(char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_ Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHARE_INFO *r_n) +static BOOL srv_io_srv_share_info(const char *desc, prs_struct *ps, int depth, SRV_SHARE_INFO *r_n) { if (r_n == NULL) return False; @@ -1294,7 +1294,7 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_get_info(const char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -1349,7 +1349,7 @@ BOOL init_srv_q_net_share_set_info(SRV_Q_NET_SHARE_SET_INFO *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_share_set_info(char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_share_set_info(const char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1396,7 +1396,7 @@ BOOL srv_io_q_net_share_set_info(char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_ Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_set_info(const char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -1427,7 +1427,7 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_ Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_share_add(char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_share_add(const char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1467,10 +1467,10 @@ BOOL srv_io_q_net_share_add(char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps return True; } -void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, char *srvname, - char *netname, uint32 type, char *remark, +void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, const char *srvname, + const char *netname, uint32 type, const char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, - char *path, char *passwd) + const char *path, const char *passwd) { q->ptr_srv_name = 1; init_unistr2(&q->uni_srv_name, srvname, strlen(srvname) +1); @@ -1490,7 +1490,7 @@ void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, char *srvname, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_add(const char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -1532,7 +1532,7 @@ void init_srv_q_net_share_del(SRV_Q_NET_SHARE_DEL *del, const char *srvname, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_share_del(char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_share_del(const char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1563,7 +1563,7 @@ BOOL srv_io_q_net_share_del(char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_del(const char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1584,7 +1584,7 @@ BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps Inits a SESS_INFO_0_STR structure ********************************************************************/ -void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name) +void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, const char *name) { DEBUG(5,("init_srv_sess_info0_str\n")); @@ -1595,7 +1595,7 @@ void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth) +static BOOL srv_io_sess_info0_str(const char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth) { if (ss0 == NULL) return False; @@ -1616,7 +1616,7 @@ static BOOL srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct Inits a SESS_INFO_0 structure ********************************************************************/ -void init_srv_sess_info0(SESS_INFO_0 *ss0, char *name) +void init_srv_sess_info0(SESS_INFO_0 *ss0, const char *name) { DEBUG(5,("init_srv_sess_info0: %s\n", name)); @@ -1627,7 +1627,7 @@ void init_srv_sess_info0(SESS_INFO_0 *ss0, char *name) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth) +static BOOL srv_io_sess_info0(const char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth) { if (ss0 == NULL) return False; @@ -1648,7 +1648,7 @@ static BOOL srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth) +static BOOL srv_io_srv_sess_info_0(const char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth) { if (ss0 == NULL) return False; @@ -1698,7 +1698,7 @@ static BOOL srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct Inits a SESS_INFO_1_STR structure ********************************************************************/ -void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user) +void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, const char *name, const char *user) { DEBUG(5,("init_srv_sess_info1_str\n")); @@ -1710,7 +1710,7 @@ void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth) +static BOOL srv_io_sess_info1_str(const char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth) { if (ss1 == NULL) return False; @@ -1734,7 +1734,7 @@ static BOOL srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct * ********************************************************************/ void init_srv_sess_info1(SESS_INFO_1 *ss1, - char *name, char *user, + const char *name, const char *user, uint32 num_opens, uint32 open_time, uint32 idle_time, uint32 user_flags) { @@ -1753,7 +1753,7 @@ void init_srv_sess_info1(SESS_INFO_1 *ss1, reads or writes a structure. ********************************************************************/ -static BOOL srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth) +static BOOL srv_io_sess_info1(const char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth) { if (ss1 == NULL) return False; @@ -1785,7 +1785,7 @@ static BOOL srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth) +static BOOL srv_io_srv_sess_info_1(const char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth) { if (ss1 == NULL) return False; @@ -1835,7 +1835,7 @@ static BOOL srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_struct *ps, int depth) +static BOOL srv_io_srv_sess_ctr(const char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_struct *ps, int depth) { SRV_SESS_INFO_CTR *ctr = *pp_ctr; @@ -1884,8 +1884,8 @@ static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_stru ********************************************************************/ void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n, - char *srv_name, char *qual_name, - char *user_name, uint32 sess_level, + const char *srv_name, const char *qual_name, + const char *user_name, uint32 sess_level, SRV_SESS_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) { @@ -1907,7 +1907,7 @@ void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -1962,7 +1962,7 @@ BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -2006,7 +2006,7 @@ void init_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id) Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth) +static BOOL srv_io_conn_info0(const char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth) { if (ss0 == NULL) return False; @@ -2027,7 +2027,7 @@ static BOOL srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth) +static BOOL srv_io_srv_conn_info_0(const char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth) { if (ss0 == NULL) return False; @@ -2070,7 +2070,7 @@ static BOOL srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct Inits a CONN_INFO_1_STR structure ********************************************************************/ -void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_name) +void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, const char *usr_name, const char *net_name) { DEBUG(5,("init_srv_conn_info1_str\n")); @@ -2082,7 +2082,7 @@ void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_nam Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth) +static BOOL srv_io_conn_info1_str(const char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth) { if (ss1 == NULL) return False; @@ -2108,7 +2108,7 @@ static BOOL srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct * void init_srv_conn_info1(CONN_INFO_1 *ss1, uint32 id, uint32 type, uint32 num_opens, uint32 num_users, uint32 open_time, - char *usr_name, char *net_name) + const char *usr_name, const char *net_name) { DEBUG(5,("init_srv_conn_info1: %s %s\n", usr_name, net_name)); @@ -2126,7 +2126,7 @@ void init_srv_conn_info1(CONN_INFO_1 *ss1, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth) +static BOOL srv_io_conn_info1(const char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth) { if (ss1 == NULL) return False; @@ -2160,7 +2160,7 @@ static BOOL srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth) +static BOOL srv_io_srv_conn_info_1(const char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth) { if (ss1 == NULL) return False; @@ -2208,7 +2208,7 @@ static BOOL srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth) +static BOOL srv_io_srv_conn_ctr(const char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth) { SRV_CONN_INFO_CTR *ctr = *pp_ctr; @@ -2257,7 +2257,7 @@ static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_stru ********************************************************************/ void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n, - char *srv_name, char *qual_name, + const char *srv_name, const char *qual_name, uint32 conn_level, SRV_CONN_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) @@ -2279,7 +2279,7 @@ void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -2327,7 +2327,7 @@ BOOL srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -2360,7 +2360,7 @@ BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *p Inits a FILE_INFO_3_STR structure ********************************************************************/ -void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_name) +void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, const char *user_name, const char *path_name) { DEBUG(5,("init_srv_file_info3_str\n")); @@ -2372,7 +2372,7 @@ void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_n Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth) +static BOOL srv_io_file_info3_str(const char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth) { if (sh1 == NULL) return False; @@ -2397,7 +2397,7 @@ static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct * void init_srv_file_info3(FILE_INFO_3 *fl3, uint32 id, uint32 perms, uint32 num_locks, - char *path_name, char *user_name) + const char *path_name, const char *user_name) { DEBUG(5,("init_srv_file_info3: %s %s\n", path_name, user_name)); @@ -2413,7 +2413,7 @@ void init_srv_file_info3(FILE_INFO_3 *fl3, Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth) +static BOOL srv_io_file_info3(const char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth) { if (fl3 == NULL) return False; @@ -2442,7 +2442,7 @@ static BOOL srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth) +static BOOL srv_io_srv_file_ctr(const char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth) { if (ctr == NULL) return False; @@ -2536,7 +2536,7 @@ void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -2591,7 +2591,7 @@ BOOL srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -2623,7 +2623,7 @@ BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps /******************************************************************* Initialize a net file close request ********************************************************************/ -void init_srv_q_net_file_close(SRV_Q_NET_FILE_CLOSE *q_n, char *server, +void init_srv_q_net_file_close(SRV_Q_NET_FILE_CLOSE *q_n, const char *server, uint32 file_id) { q_n->ptr_srv_name = 1; @@ -2634,7 +2634,7 @@ void init_srv_q_net_file_close(SRV_Q_NET_FILE_CLOSE *q_n, char *server, /******************************************************************* Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_file_close(char *desc, SRV_Q_NET_FILE_CLOSE *q_n, +BOOL srv_io_q_net_file_close(const char *desc, SRV_Q_NET_FILE_CLOSE *q_n, prs_struct *ps, int depth) { if (q_n == NULL) @@ -2664,7 +2664,7 @@ BOOL srv_io_q_net_file_close(char *desc, SRV_Q_NET_FILE_CLOSE *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_file_close(char *desc, SRV_R_NET_FILE_CLOSE *q_n, +BOOL srv_io_r_net_file_close(const char *desc, SRV_R_NET_FILE_CLOSE *q_n, prs_struct *ps, int depth) { if (q_n == NULL) @@ -2698,7 +2698,7 @@ void init_srv_info_100(SRV_INFO_100 *sv100, uint32 platform_id, const char *name Reads or writes a SRV_INFO_101 structure. ********************************************************************/ -static BOOL srv_io_info_100(char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth) +static BOOL srv_io_info_100(const char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth) { if (sv100 == NULL) return False; @@ -2743,7 +2743,7 @@ void init_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, const char *name Reads or writes a SRV_INFO_101 structure. ********************************************************************/ -static BOOL srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth) +static BOOL srv_io_info_101(const char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth) { if (sv101 == NULL) return False; @@ -2813,7 +2813,7 @@ void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, const char *name Reads or writes a SRV_INFO_102 structure. ********************************************************************/ -static BOOL srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth) +static BOOL srv_io_info_102(const char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth) { if (sv102 == NULL) return False; @@ -2872,7 +2872,7 @@ static BOOL srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int Reads or writes a SRV_INFO_102 structure. ********************************************************************/ -static BOOL srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth) +static BOOL srv_io_info_ctr(const char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth) { if (ctr == NULL) return False; @@ -2919,7 +2919,7 @@ static BOOL srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int d ********************************************************************/ void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv, - char *server_name, uint32 switch_value) + const char *server_name, uint32 switch_value) { DEBUG(5,("init_srv_q_net_srv_get_info\n")); @@ -2932,7 +2932,7 @@ void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_srv_get_info(const char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -2996,7 +2996,7 @@ void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, +BOOL srv_io_q_net_srv_set_info(const char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "srv_io_q_net_srv_set_info"); @@ -3034,7 +3034,7 @@ BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_srv_get_info(const char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -3058,7 +3058,7 @@ BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_stru Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, +BOOL srv_io_r_net_srv_set_info(const char *desc, SRV_R_NET_SRV_SET_INFO *r_n, prs_struct *ps, int depth) { prs_debug(ps, depth, desc, "srv_io_r_net_srv_set_info"); @@ -3080,7 +3080,7 @@ BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -3103,7 +3103,7 @@ BOOL srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct * Reads or writes a TIME_OF_DAY_INFO structure. ********************************************************************/ -static BOOL srv_io_time_of_day_info(char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth) +static BOOL srv_io_time_of_day_info(const char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth) { if (tod == NULL) return False; @@ -3172,7 +3172,7 @@ void init_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -3224,7 +3224,7 @@ BOOL init_srv_q_net_disk_enum(SRV_Q_NET_DISK_ENUM *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -3268,7 +3268,7 @@ BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth) { int i; @@ -3357,7 +3357,7 @@ BOOL init_srv_q_net_name_validate(SRV_Q_NET_NAME_VALIDATE *q_n, const char *srv_ Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_name_validate(char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_name_validate(const char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -3396,7 +3396,7 @@ BOOL srv_io_q_net_name_validate(char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_st Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_name_validate(const char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -3417,7 +3417,7 @@ BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_st Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_file_query_secdesc(char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_file_query_secdesc(const char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -3465,7 +3465,7 @@ BOOL srv_io_q_net_file_query_secdesc(char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_file_query_secdesc(const char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -3504,7 +3504,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r Reads or writes a structure. ********************************************************************/ -BOOL srv_io_q_net_file_set_secdesc(char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth) +BOOL srv_io_q_net_file_set_secdesc(const char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth) { if (q_n == NULL) return False; @@ -3561,7 +3561,7 @@ BOOL srv_io_q_net_file_set_secdesc(char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth) { if (r_n == NULL) return False; @@ -3582,7 +3582,7 @@ BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, Inits a structure ********************************************************************/ -void init_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_u, char *server) +void init_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_u, const char *server) { q_u->ptr_srv_name = 1; init_unistr2(&q_u->uni_srv_name, server, strlen(server) + 1); diff --git a/source3/rpc_parse/parse_wks.c b/source3/rpc_parse/parse_wks.c index 7b8fd76b7b..b6de058652 100644 --- a/source3/rpc_parse/parse_wks.c +++ b/source3/rpc_parse/parse_wks.c @@ -42,7 +42,7 @@ void init_wks_q_query_info(WKS_Q_QUERY_INFO *q_u, Reads or writes a WKS_Q_QUERY_INFO structure. ********************************************************************/ -BOOL wks_io_q_query_info(char *desc, WKS_Q_QUERY_INFO *q_u, prs_struct *ps, int depth) +BOOL wks_io_q_query_info(const char *desc, WKS_Q_QUERY_INFO *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -90,7 +90,7 @@ void init_wks_info_100(WKS_INFO_100 *inf, Reads or writes a WKS_INFO_100 structure. ********************************************************************/ -static BOOL wks_io_wks_info_100(char *desc, WKS_INFO_100 *inf, prs_struct *ps, int depth) +static BOOL wks_io_wks_info_100(const char *desc, WKS_INFO_100 *inf, prs_struct *ps, int depth) { if (inf == NULL) return False; @@ -150,7 +150,7 @@ void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u, Reads or writes a structure. ********************************************************************/ -BOOL wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth) +BOOL wks_io_r_query_info(const char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index e3495576c9..a2c2290fb7 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -645,7 +645,7 @@ static BOOL api_lsa_query_info2(pipes_struct *p) \PIPE\ntlsa commands ***************************************************************************/ -static struct api_struct api_lsa_cmds[] = +static const struct api_struct api_lsa_cmds[] = { { "LSA_OPENPOLICY2" , LSA_OPENPOLICY2 , api_lsa_open_policy2 }, { "LSA_OPENPOLICY" , LSA_OPENPOLICY , api_lsa_open_policy }, diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 89e46402cf..c3d48a6527 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -105,7 +105,7 @@ NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_C uint32 pdc_connection_status = 0x0; uint32 logon_attempts = 0x0; uint32 tc_status = ERROR_NO_LOGON_SERVERS; - char *trusted_domain = "test_domain"; + const char *trusted_domain = "test_domain"; DEBUG(0, ("*** net long ctrl2 %d, %d, %d\n", q_u->function_code, q_u->query_level, q_u->switch_value)); @@ -132,7 +132,7 @@ NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_C NTSTATUS _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u) { - char *trusted_domain = "test_domain"; + const char *trusted_domain = "test_domain"; uint32 num_trust_domains = 1; DEBUG(6,("_net_trust_dom_list: %d\n", __LINE__)); @@ -565,7 +565,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * DEBUG(3,("User:[%s@%s] Requested Domain:[%s]\n", nt_username, nt_workstation, nt_domain)); - pstrcpy(current_user_info.smb_name, nt_username); + fstrcpy(current_user_info.smb_name, nt_username); sub_set_smb_name(nt_username); /* diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 5a935be279..8aaab43461 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -457,8 +457,8 @@ failed authentication on named pipe %s.\n", domain, user_name, wks, p->name )); struct api_cmd { - char * pipe_clnt_name; - char * pipe_srv_name; + const char * pipe_clnt_name; + const char * pipe_srv_name; BOOL (*fn) (pipes_struct *); }; @@ -1173,7 +1173,7 @@ BOOL api_pipe_request(pipes_struct *p) Calls the underlying RPC function for a named pipe. ********************************************************************/ -BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, +BOOL api_rpcTNP(pipes_struct *p, const char *rpc_name, const struct api_struct *api_rpc_cmds) { int fn_num; diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 215d468404..cbf237251e 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -80,7 +80,7 @@ static REGISTRY_KEY *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd) *******************************************************************/ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY *parent, - char *subkeyname, uint32 access_granted ) + const char *subkeyname, uint32 access_granted ) { REGISTRY_KEY *regkey = NULL; NTSTATUS result = NT_STATUS_OK; @@ -341,7 +341,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) { NTSTATUS status = NT_STATUS_NO_SUCH_FILE; fstring name; - char *value_ascii = ""; + const char *value_ascii = ""; fstring value; int value_length; REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 68a2dcb83d..291ed50ddd 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -42,7 +42,7 @@ /* Table to map the driver version */ /* to OS */ -char * drv_ver_to_os[] = { +static const char * drv_ver_to_os[] = { "WIN9X", /* driver version/cversion 0 */ "", /* unused ? */ "WINNT", /* driver version/cversion 2 */ @@ -50,8 +50,8 @@ char * drv_ver_to_os[] = { }; struct table_node { - char *long_archi; - char *short_archi; + const char *long_archi; + const char *short_archi; int version; }; @@ -712,7 +712,7 @@ static void notify_system_time(struct spoolss_notify_msg *msg, } struct notify2_message_table { - char *name; + const char *name; void (*fn)(struct spoolss_notify_msg *msg, SPOOL_NOTIFY_INFO_DATA *data, TALLOC_CTX *mem_ctx); }; @@ -1708,7 +1708,7 @@ static BOOL convert_printer_driver_info(const SPOOL_PRINTER_DRIVER_INFO_LEVEL *u return result; } -BOOL convert_devicemode(char *printername, const DEVICEMODE *devmode, +BOOL convert_devicemode(const char *printername, const DEVICEMODE *devmode, NT_DEVICEMODE **pp_nt_devmode) { NT_DEVICEMODE *nt_devmode = *pp_nt_devmode; @@ -2085,7 +2085,7 @@ done: ***************************************************************************/ static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer, - char *key, char *value, uint32 *type, uint8 **data, + const char *key, const char *value, uint32 *type, uint8 **data, uint32 *needed, uint32 in_size ) { REGISTRY_VALUE *val; @@ -2121,7 +2121,7 @@ static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printe Internal routine for removing printerdata ***************************************************************************/ -static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value ) +static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value ) { delete_printer_data( printer->info_2, key, value ); @@ -2132,7 +2132,7 @@ static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, Internal routine for storing printerdata ***************************************************************************/ -static WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value, +static WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value, uint32 type, uint8 *data, int real_len ) { delete_printer_data( printer->info_2, key, value ); @@ -3094,7 +3094,7 @@ static void spoolss_notify_job_status_string(int snum, * Now we're returning job status codes we just return a "" here. JRA. */ - char *p = ""; + const char *p = ""; pstring temp; uint32 len; @@ -3247,7 +3247,7 @@ struct s_notify_info_data_table { uint16 type; uint16 field; - char *name; + const char *name; uint32 size; void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, @@ -3258,7 +3258,7 @@ struct s_notify_info_data_table whether the notification data is a pointer to a variable sized buffer, a one value uint32 or a two value uint32. */ -struct s_notify_info_data_table notify_info_data_table[] = +static const struct s_notify_info_data_table notify_info_data_table[] = { { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_SERVER_NAME, "PRINTER_NOTIFY_SERVER_NAME", NOTIFY_STRING, spoolss_notify_server_name }, { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PRINTER_NAME, "PRINTER_NOTIFY_PRINTER_NAME", NOTIFY_STRING, spoolss_notify_printer_name }, @@ -4897,11 +4897,11 @@ static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fst * convert an array of ascii string to a UNICODE string ********************************************************************/ -static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, char *servername) +static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, const char *servername) { int i=0; int j=0; - char *v; + const char *v; pstring line; uint16 *tuary; @@ -6839,7 +6839,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM * /**************************************************************************** ****************************************************************************/ -static void fill_port_1(PORT_INFO_1 *port, char *name) +static void fill_port_1(PORT_INFO_1 *port, const char *name) { init_unistr(&port->port_name, name); } @@ -6847,7 +6847,7 @@ static void fill_port_1(PORT_INFO_1 *port, char *name) /**************************************************************************** ****************************************************************************/ -static void fill_port_2(PORT_INFO_2 *port, char *name) +static void fill_port_2(PORT_INFO_2 *port, const char *name) { init_unistr(&port->port_name, name); init_unistr(&port->monitor_name, "Local Monitor"); diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 69f82bb96f..e0a575f143 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -128,7 +128,7 @@ static TDB_CONTEXT *share_tdb; /* used for share security descriptors */ BOOL share_info_db_init(void) { static pid_t local_pid; - char *vstring = "INFO/version"; + const char *vstring = "INFO/version"; int32 vers_id; if (share_tdb && local_pid == sys_getpid()) @@ -1008,7 +1008,7 @@ static void init_srv_conn_info_0(SRV_CONN_INFO_0 *ss0, uint32 *snum, uint32 *sto static void init_srv_conn_1_info(CONN_INFO_1 *se1, CONN_INFO_1_STR *str1, uint32 id, uint32 type, uint32 num_opens, uint32 num_users, uint32 open_time, - char *usr_name, char *net_name) + const char *usr_name, const char *net_name) { init_srv_conn_info1(se1 , id, type, num_opens, num_users, open_time, usr_name, net_name); init_srv_conn_info1_str(str1, usr_name, net_name); diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c index 72a057b91c..4eba9c7d1f 100644 --- a/source3/rpc_server/srv_util.c +++ b/source3/rpc_server/srv_util.c @@ -485,7 +485,7 @@ NTSTATUS local_lookup_user_name(uint32 rid, char *user_name, uint32 *type) ********************************************************************/ NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid) { - char *grp_name; + const char *grp_name; int i = -1; /* start do loop at -1 */ do /* find, if it exists, a group rid for the group name*/ @@ -502,9 +502,9 @@ NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid) /******************************************************************* Look up a local (BUILTIN) alias name and return a rid ********************************************************************/ -NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid) +NTSTATUS local_lookup_alias_rid(const char *alias_name, uint32 *rid) { - char *als_name; + const char *als_name; int i = -1; /* start do loop at -1 */ do /* find, if it exists, a alias rid for the alias name*/ diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 5c6308d07c..fbc4d49819 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -94,7 +94,7 @@ static void display_sam_user_info_21(SAM_USER_INFO_21 *usr) } } -static char *display_time(NTTIME nttime) +static const char *display_time(NTTIME nttime) { static fstring string; diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index c76e84580d..06da00748b 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -26,12 +26,12 @@ #include "rpcclient.h" struct table_node { - char *long_archi; - char *short_archi; + const char *long_archi; + const char *short_archi; int version; }; -struct table_node archi_table[]= { +static const struct table_node archi_table[]= { {"Windows 4.0", "WIN40", 0 }, {"Windows NT x86", "W32X86", 2 }, @@ -45,7 +45,7 @@ struct table_node archi_table[]= { function to do the mapping between the long architecture name and the short one. ****************************************************************************/ -BOOL get_short_archi(char *short_archi, char *long_archi) +BOOL get_short_archi(char *short_archi, const char *long_archi) { int i=-1; @@ -1153,7 +1153,7 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch) wrapper for strtok to get the next parameter from a delimited list. Needed to handle the empty parameter string denoted by "NULL" *************************************************************************/ -static char* get_driver_3_param (char* str, char* delim, UNISTR* dest) +static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest) { char *ptr; @@ -2135,7 +2135,7 @@ static NTSTATUS cmd_spoolss_enum_printerkey( struct cli_state *cli, BOOL got_hnd = False; pstring printername; fstring servername, user; - char *keyname = NULL; + const char *keyname = NULL; POLICY_HND hnd; uint16 *keylist = NULL, *curkey; diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h index ae5b5f3c4f..3276a62437 100644 --- a/source3/rpcclient/rpcclient.h +++ b/source3/rpcclient/rpcclient.h @@ -23,12 +23,12 @@ #define RPCCLIENT_H struct cmd_set { - char *name; + const char *name; NTSTATUS (*fn)(struct cli_state*, TALLOC_CTX *mem_ctx, int argc, char **argv); int pipe_idx; - char *description; - char *usage; + const char *description; + const char *usage; }; #endif /* RPCCLIENT_H */ diff --git a/source3/smbd/build_options.c b/source3/smbd/build_options.c index 085f287446..da5accebab 100644 --- a/source3/smbd/build_options.c +++ b/source3/smbd/build_options.c @@ -23,7 +23,7 @@ #include "build_env.h" #include "dynconfig.h" -static void output(BOOL screen, char *format, ...) PRINTF_ATTRIBUTE(2,3); +static void output(BOOL screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3); /* #define OUTPUT(x) snprintf(outstring,sizeof(outstring),x); output(screen,outstring); @@ -31,7 +31,7 @@ static void output(BOOL screen, char *format, ...) PRINTF_ATTRIBUTE(2,3); /**************************************************************************** helper function for build_options ****************************************************************************/ -static void output(BOOL screen, char *format, ...) +static void output(BOOL screen, const char *format, ...) { char *ptr; va_list ap; diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index ad394a01ca..a7636e889e 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -35,7 +35,7 @@ TDB_CONTEXT *conn_tdb_ctx(void) return tdb; } -static void make_conn_key(connection_struct *conn,char *name, TDB_DATA *pkbuf, struct connections_key *pkey) +static void make_conn_key(connection_struct *conn, const char *name, TDB_DATA *pkbuf, struct connections_key *pkey) { ZERO_STRUCTP(pkey); pkey->pid = sys_getpid(); @@ -50,7 +50,7 @@ static void make_conn_key(connection_struct *conn,char *name, TDB_DATA *pkbuf, s Delete a connection record. ****************************************************************************/ -BOOL yield_connection(connection_struct *conn,char *name) +BOOL yield_connection(connection_struct *conn, const char *name) { struct connections_key key; TDB_DATA kbuf; @@ -116,7 +116,7 @@ static int count_fn( TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *u Claim an entry in the connections database. ****************************************************************************/ -BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOOL Clear, uint32 msg_flags) +BOOL claim_connection(connection_struct *conn, const char *name,int max_connections,BOOL Clear, uint32 msg_flags) { struct connections_key key; struct connections_data crec; diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 396ecd98c4..d3c71ad24e 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -327,15 +327,20 @@ void dptr_closepath(char *path,uint16 spid) Start a directory listing. ****************************************************************************/ -static BOOL start_dir(connection_struct *conn,char *directory) +static BOOL start_dir(connection_struct *conn, pstring directory) { + const char *dir2; + DEBUG(5,("start_dir dir=%s\n",directory)); if (!check_name(directory,conn)) return(False); + + /* use a const pointer from here on */ + dir2 = directory; - if (! *directory) - directory = "."; + if (! *dir2) + dir2 = "."; conn->dirptr = OpenDir(conn, directory, True); if (conn->dirptr) { @@ -392,7 +397,7 @@ static void dptr_close_oldest(BOOL old) me at Andrew's knee.... :-) :-). JRA. ****************************************************************************/ -int dptr_create(connection_struct *conn,char *path, BOOL old_handle, BOOL expect_close,uint16 spid) +int dptr_create(connection_struct *conn, pstring path, BOOL old_handle, BOOL expect_close,uint16 spid) { dptr_struct *dptr; @@ -812,10 +817,10 @@ static BOOL file_is_special(connection_struct *conn, char *name, SMB_STRUCT_STAT Open a directory. ********************************************************************/ -void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) +void *OpenDir(connection_struct *conn, const char *name, BOOL use_veto) { Dir *dirp; - char *n; + const char *n; DIR *p = conn->vfs_ops.opendir(conn,name); int used=0; @@ -1009,7 +1014,7 @@ static ubi_dlNewList( dir_cache ); Output: None. *****************************************************************************/ -void DirCacheAdd( char *path, char *name, char *dname, int snum ) +void DirCacheAdd( const char *path, char *name, char *dname, int snum ) { int pathlen; int namelen; @@ -1056,7 +1061,7 @@ void DirCacheAdd( char *path, char *name, char *dname, int snum ) for large caches. *****************************************************************************/ -char *DirCacheCheck( char *path, char *name, int snum ) +char *DirCacheCheck( const char *path, const char *name, int snum ) { dir_cache_entry *entry; diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 202bd75d4c..bcfd366741 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -31,7 +31,7 @@ extern BOOL case_preserve; extern BOOL short_case_preserve; extern BOOL use_mangled_map; -static BOOL scan_directory(char *path, char *name,connection_struct *conn,BOOL docache); +static BOOL scan_directory(const char *path, pstring name,connection_struct *conn,BOOL docache); /**************************************************************************** Check if two filenames are equal. @@ -387,7 +387,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen a valid one for the user to access. ****************************************************************************/ -BOOL check_name(char *name,connection_struct *conn) +BOOL check_name(pstring name,connection_struct *conn) { BOOL ret; @@ -428,7 +428,7 @@ BOOL check_name(char *name,connection_struct *conn) If the name looks like a mangled name then try via the mangling functions ****************************************************************************/ -static BOOL scan_directory(char *path, char *name,connection_struct *conn,BOOL docache) +static BOOL scan_directory(const char *path, pstring name,connection_struct *conn,BOOL docache) { void *cur_dir; char *dname; diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index f174db5aa6..61288e0167 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -109,14 +109,14 @@ static char* Expand(connection_struct *conn, int snum, char* s) /******************************************************************* check a API string for validity when we only need to check the prefix ******************************************************************/ -static BOOL prefix_ok(char *str,char *prefix) +static BOOL prefix_ok(const char *str, const char *prefix) { return(strncmp(str,prefix,strlen(prefix)) == 0); } struct pack_desc { - char* format; /* formatstring for structure */ - char* subformat; /* subformat for structure */ + const char* format; /* formatstring for structure */ + const char* subformat; /* subformat for structure */ char* base; /* baseaddress of buffer */ int buflen; /* remaining size for fixed part; on init: length of base */ int subcount; /* count of substructures */ @@ -125,11 +125,11 @@ struct pack_desc { char* stringbuf; /* pointer into buffer for remaining variable part */ int neededlen; /* total needed size */ int usedlen; /* total used size (usedlen <= neededlen and usedlen <= buflen) */ - char* curpos; /* current position; pointer into format or subformat */ + const char* curpos; /* current position; pointer into format or subformat */ int errcode; }; -static int get_counter(char** p) +static int get_counter(const char** p) { int i, n; if (!p || !(*p)) return(1); @@ -144,7 +144,7 @@ static int get_counter(char** p) } } -static int getlen(char* p) +static int getlen(const char* p) { int n = 0; if (!p) return(0); @@ -329,7 +329,7 @@ static int package(struct pack_desc* p, ...) #define PACKl(desc,t,v,l) package(desc,v,l) #endif -static void PACKI(struct pack_desc* desc,char *t,int v) +static void PACKI(struct pack_desc* desc, const char *t,int v) { PACK(desc,t,v); } @@ -1704,7 +1704,7 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para char *UserName = skip_string(str2,1); char *p = skip_string(UserName,1); int uLevel = SVAL(p,0); - char *p2; + const char *level_string; int count=0; *rparam_len = 8; @@ -1715,13 +1715,13 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para return False; switch( uLevel ) { case 0: - p2 = "B21"; + level_string = "B21"; break; default: return False; } - if (strcmp(p2,str2) != 0) + if (strcmp(level_string,str2) != 0) return False; *rdata_len = mdrcnt + 1024; @@ -2584,6 +2584,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param char *p = skip_string(UserName,1); int uLevel = SVAL(p,0); char *p2; + const char *level_string; /* get NIS home of a previously validated user - simeon */ /* With share level security vuid will always be zero. @@ -2602,15 +2603,15 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param if (strcmp(str1,"zWrLh") != 0) return False; switch( uLevel ) { - case 0: p2 = "B21"; break; - case 1: p2 = "B21BB16DWzzWz"; break; - case 2: p2 = "B21BB16DWzzWzDzzzzDDDDWb21WWzWW"; break; - case 10: p2 = "B21Bzzz"; break; - case 11: p2 = "B21BzzzWDDzzDDWWzWzDWb21W"; break; + case 0: level_string = "B21"; break; + case 1: level_string = "B21BB16DWzzWz"; break; + case 2: level_string = "B21BB16DWzzWzDzzzzDDDDWb21WWzWW"; break; + case 10: level_string = "B21Bzzz"; break; + case 11: level_string = "B21BzzzWDDzzDDWWzWzDWb21W"; break; default: return False; } - if (strcmp(p2,str2) != 0) return False; + if (strcmp(level_string,str2) != 0) return False; *rdata_len = mdrcnt + 1024; *rdata = REALLOC(*rdata,*rdata_len); @@ -3407,9 +3408,9 @@ static BOOL api_Unsupported(connection_struct *conn,uint16 vuid, char *param,cha -const static struct +static const struct { - char *name; + const char *name; int id; BOOL (*fn)(connection_struct *,uint16,char *,char *, int,int,char **,char **,int *,int *); diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 392e48afc1..f5c703a5bf 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -23,8 +23,8 @@ static struct mangle_fns *mangle_fns; /* this allows us to add more mangling backends */ -static struct { - char *name; +static const struct { + const char *name; struct mangle_fns *(*init_fn)(void); } mangle_backends[] = { { "hash", mangle_hash_init }, diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index 0446a953ff..929cb0e07f 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -361,15 +361,15 @@ done: */ static void init_chartest( void ) { - char *illegalchars = "*\\/?<>|\":"; - unsigned char *s; + const char *illegalchars = "*\\/?<>|\":"; + const unsigned char *s; memset( (char *)chartest, '\0', 256 ); - for( s = (unsigned char *)illegalchars; *s; s++ ) + for( s = (const unsigned char *)illegalchars; *s; s++ ) chartest[*s] = ILLEGAL_MASK; - for( s = (unsigned char *)basechars; *s; s++ ) + for( s = (const unsigned char *)basechars; *s; s++ ) chartest[*s] |= BASECHAR_MASK; ct_initialized = True; diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index b91c0c0866..c8f023514e 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -377,9 +377,9 @@ protocol [LANMAN2.1] #define ARCH_ALL 0x3F /* List of supported protocols, most desired first */ -static struct { - char *proto_name; - char *short_name; +static const struct { + const char *proto_name; + const char *short_name; int (*proto_reply_fn)(char *, char *); int protocol_level; } supported_protocols[] = { diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 740f450db6..29ebdce5a8 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -27,7 +27,7 @@ extern BOOL case_sensitive; extern BOOL case_preserve; extern BOOL short_case_preserve; -static char *known_nt_pipes[] = { +static const char *known_nt_pipes[] = { "\\LANMAN", "\\srvsvc", "\\samr", diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 923b20ad66..7421c16b40 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -339,7 +339,7 @@ force write permissions on print services. functions. Any message that has a NULL function is unimplemented - please feel free to contribute implementations! */ -const static struct smb_message_struct +static const struct smb_message_struct { const char *name; int (*fn)(connection_struct *conn, char *, char *, int, int); @@ -890,7 +890,7 @@ return a string containing the function name of a SMB command ****************************************************************************/ const char *smb_fn_name(int type) { - static char *unknown_name = "SMBunknown"; + const char *unknown_name = "SMBunknown"; if (smb_messages[type].name == NULL) return(unknown_name); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 4335728afc..beccc1bba6 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -271,7 +271,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt set_message_end(outbuf,p); } else { /* NT sets the fstype of IPC$ to the null string */ - char *fsname = IS_IPC(conn) ? "" : lp_fstype(SNUM(conn)); + const char *fsname = IS_IPC(conn) ? "" : lp_fstype(SNUM(conn)); set_message(outbuf,3,0,True); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 9bc02c3e17..0a11919577 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -179,11 +179,12 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports) if (!smb_ports) { ports = lp_smb_ports(); if (!ports || !*ports) { - ports = SMB_PORTS; + ports = smb_xstrdup(SMB_PORTS); + } else { + ports = smb_xstrdup(ports); } - ports = strdup(ports); } else { - ports = strdup(smb_ports); + ports = smb_xstrdup(smb_ports); } if (lp_interfaces() && lp_bind_interfaces_only()) { @@ -543,7 +544,7 @@ static void decrement_smbd_process_count(void) Exit the server. ****************************************************************************/ -void exit_server(char *reason) +void exit_server(const char *reason) { static int firsttime=1; extern char *last_inbuf; diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c index 6b7b0f3ad1..6c12cfac62 100644 --- a/source3/smbd/utmp.c +++ b/source3/smbd/utmp.c @@ -457,7 +457,7 @@ static void sys_utmp_update(struct utmp *u, const char *hostname, BOOL claim) static int ut_id_encode(int i, char *fourbyte) { int nbase; - char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + const char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; fourbyte[0] = 'S'; fourbyte[1] = 'M'; diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 7e60d3dacb..7b8d9d7e9e 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -781,7 +781,7 @@ char *vfs_GetWd(connection_struct *conn, char *path) Widelinks are allowed if widelinks is true. ********************************************************************/ -BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks) +BOOL reduce_name(connection_struct *conn, pstring s, const char *dir,BOOL widelinks) { #ifndef REDUCE_PATHS return True; diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c index 12db8b337f..d7e4350ada 100644 --- a/source3/tdb/tdbutil.c +++ b/source3/tdb/tdbutil.c @@ -73,7 +73,7 @@ static int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned Lock a chain by string. Return -1 if timeout or lock failed. ****************************************************************************/ -int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout) +int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout) { TDB_DATA key; @@ -87,7 +87,7 @@ int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout) Unlock a chain by string. ****************************************************************************/ -void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval) +void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval) { TDB_DATA key; @@ -101,7 +101,7 @@ void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval) Read lock a chain by string. Return -1 if timeout or lock failed. ****************************************************************************/ -int tdb_read_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout) +int tdb_read_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout) { TDB_DATA key; @@ -115,7 +115,7 @@ int tdb_read_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout) Read unlock a chain by string. ****************************************************************************/ -void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, char *keyval) +void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval) { TDB_DATA key; @@ -131,7 +131,7 @@ void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, char *keyval) Output is int32 in native byte order. ****************************************************************************/ -int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len) +int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len) { TDB_DATA key, data; int32 ret; @@ -154,7 +154,7 @@ int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len) Output is int32 in native byte order. ****************************************************************************/ -int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr) +int32 tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr) { return tdb_fetch_int32_byblob(tdb, keystr, strlen(keystr) + 1); } @@ -164,7 +164,7 @@ int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr) Input is int32 in native byte order. Output in tdb is in little-endian. ****************************************************************************/ -int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v) +int tdb_store_int32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, int32 v) { TDB_DATA key, data; int32 v_store; @@ -183,7 +183,7 @@ int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v) Input is int32 in native byte order. Output in tdb is in little-endian. ****************************************************************************/ -int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v) +int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32 v) { return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v); } @@ -193,7 +193,7 @@ int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v) Output is uint32 in native byte order. ****************************************************************************/ -BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 *value) +BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len, uint32 *value) { TDB_DATA key, data; @@ -215,7 +215,7 @@ BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 Output is uint32 in native byte order. ****************************************************************************/ -BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value) +BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value) { return tdb_fetch_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value); } @@ -225,7 +225,7 @@ BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value) Input is uint32 in native byte order. Output in tdb is in little-endian. ****************************************************************************/ -BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 value) +BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, uint32 value) { TDB_DATA key, data; uint32 v_store; @@ -248,7 +248,7 @@ BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 Input is uint32 in native byte order. Output in tdb is in little-endian. ****************************************************************************/ -BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value) +BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value) { return tdb_store_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value); } @@ -257,7 +257,7 @@ BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value) on failure. ****************************************************************************/ -int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, TDB_DATA data, int flags) +int tdb_store_by_string(TDB_CONTEXT *tdb, const char *keystr, TDB_DATA data, int flags) { TDB_DATA key; @@ -272,7 +272,7 @@ int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, TDB_DATA data, int flags free() on the result dptr. ****************************************************************************/ -TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr) +TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, const char *keystr) { TDB_DATA key; @@ -286,7 +286,7 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr) Delete an entry using a null terminated string key. ****************************************************************************/ -int tdb_delete_by_string(TDB_CONTEXT *tdb, char *keystr) +int tdb_delete_by_string(TDB_CONTEXT *tdb, const char *keystr) { TDB_DATA key; @@ -300,7 +300,7 @@ int tdb_delete_by_string(TDB_CONTEXT *tdb, char *keystr) Atomic integer change. Returns old value. To create, set initial value in *oldval. ****************************************************************************/ -int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val) +int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32 *oldval, int32 change_val) { int32 val; int32 ret = -1; @@ -341,7 +341,7 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval. ****************************************************************************/ -BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val) +BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val) { uint32 val; BOOL ret = False; @@ -384,7 +384,7 @@ BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, ui integers and strings. ****************************************************************************/ -size_t tdb_pack(char *buf, int bufsize, char *fmt, ...) +size_t tdb_pack(char *buf, int bufsize, const char *fmt, ...) { va_list ap; uint16 w; @@ -395,7 +395,7 @@ size_t tdb_pack(char *buf, int bufsize, char *fmt, ...) char *s; char c; char *buf0 = buf; - char *fmt0 = fmt; + const char *fmt0 = fmt; int bufsize0 = bufsize; va_start(ap, fmt); @@ -468,7 +468,7 @@ size_t tdb_pack(char *buf, int bufsize, char *fmt, ...) integers and strings. ****************************************************************************/ -int tdb_unpack(char *buf, int bufsize, char *fmt, ...) +int tdb_unpack(char *buf, int bufsize, const char *fmt, ...) { va_list ap; uint16 *w; @@ -479,7 +479,7 @@ int tdb_unpack(char *buf, int bufsize, char *fmt, ...) char *s, **b; char c; char *buf0 = buf; - char *fmt0 = fmt; + const char *fmt0 = fmt; int bufsize0 = bufsize; va_start(ap, fmt); diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c index 045246f126..017bb1c06d 100644 --- a/source3/torture/denytest.c +++ b/source3/torture/denytest.c @@ -27,11 +27,11 @@ extern BOOL torture_showall; enum deny_result {A_0=0, A_X=1, A_R=2, A_W=3, A_RW=5}; -static char *denystr(int denymode) +static const char *denystr(int denymode) { struct { int v; - char *name; + const char *name; } deny_modes[] = { {DENY_DOS, "DENY_DOS"}, {DENY_ALL, "DENY_ALL"}, @@ -47,11 +47,11 @@ static char *denystr(int denymode) return "DENY_XXX"; } -static char *openstr(int mode) +static const char *openstr(int mode) { struct { int v; - char *name; + const char *name; } open_modes[] = { {O_RDWR, "O_RDWR"}, {O_RDONLY, "O_RDONLY"}, @@ -64,11 +64,11 @@ static char *openstr(int mode) return "O_XXX"; } -static char *resultstr(enum deny_result res) +static const char *resultstr(enum deny_result res) { struct { enum deny_result res; - char *name; + const char *name; } results[] = { {A_X, "X"}, {A_0, "-"}, @@ -1412,7 +1412,7 @@ BOOL torture_denytest1(int dummy) int fnum1, fnum2; int i; BOOL correct = True; - char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"}; + const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"}; if (!torture_open_connection(&cli1)) { return False; @@ -1431,7 +1431,7 @@ BOOL torture_denytest1(int dummy) for (i=0; i\"")) { - if (strcmp(string,"..") == 0) string = "."; + if (strcmp(string,"..") == 0) + string = "."; + return strcmp(pattern, string); } @@ -124,7 +126,7 @@ int ms_fnmatch_lanman(char *pattern, char *string) return ms_fnmatch_lanman_core(pattern, string); } -static BOOL reg_match_one(struct cli_state *cli, char *pattern, char *file) +static BOOL reg_match_one(struct cli_state *cli, const char *pattern, const char *file) { /* oh what a weird world this is */ if (old_list && strcmp(pattern, "*.*") == 0) return True; diff --git a/source3/torture/nsstest.c b/source3/torture/nsstest.c index c9b068aa04..a82fa05203 100644 --- a/source3/torture/nsstest.c +++ b/source3/torture/nsstest.c @@ -20,8 +20,8 @@ #include "includes.h" -static char *so_path = "/lib/libnss_winbind.so"; -static char *nss_name = "winbind"; +static const char *so_path = "/lib/libnss_winbind.so"; +static const char *nss_name = "winbind"; static int nss_errno; static NSS_STATUS last_error; static int total_errors; diff --git a/source3/torture/scanner.c b/source3/torture/scanner.c index 4f4164ea33..7db3dde9c0 100644 --- a/source3/torture/scanner.c +++ b/source3/torture/scanner.c @@ -29,7 +29,7 @@ /**************************************************************************** look for a partial hit ****************************************************************************/ -static void trans2_check_hit(char *format, int op, int level, NTSTATUS status) +static void trans2_check_hit(const char *format, int op, int level, NTSTATUS status) { if (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_INVALID_LEVEL) || NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NOT_IMPLEMENTED) || @@ -78,7 +78,7 @@ static NTSTATUS try_trans2(struct cli_state *cli, static NTSTATUS try_trans2_len(struct cli_state *cli, - char *format, + const char *format, int op, int level, char *param, char *data, int param_len, int *data_len, @@ -113,7 +113,7 @@ static NTSTATUS try_trans2_len(struct cli_state *cli, check for existance of a trans2 call ****************************************************************************/ static BOOL scan_trans2(struct cli_state *cli, int op, int level, - int fnum, int dnum, char *fname) + int fnum, int dnum, const char *fname) { int data_len = 0; int param_len = 0; @@ -193,7 +193,7 @@ BOOL torture_trans2_scan(int dummy) { static struct cli_state cli; int op, level; - char *fname = "\\scanner.dat"; + const char *fname = "\\scanner.dat"; int fnum, dnum; printf("starting trans2 scan test\n"); @@ -233,7 +233,7 @@ BOOL torture_trans2_scan(int dummy) /**************************************************************************** look for a partial hit ****************************************************************************/ -static void nttrans_check_hit(char *format, int op, int level, NTSTATUS status) +static void nttrans_check_hit(const char *format, int op, int level, NTSTATUS status) { if (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_INVALID_LEVEL) || NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NOT_IMPLEMENTED) || @@ -280,7 +280,7 @@ static NTSTATUS try_nttrans(struct cli_state *cli, static NTSTATUS try_nttrans_len(struct cli_state *cli, - char *format, + const char *format, int op, int level, char *param, char *data, int param_len, int *data_len, @@ -315,7 +315,7 @@ static NTSTATUS try_nttrans_len(struct cli_state *cli, check for existance of a nttrans call ****************************************************************************/ static BOOL scan_nttrans(struct cli_state *cli, int op, int level, - int fnum, int dnum, char *fname) + int fnum, int dnum, const char *fname) { int data_len = 0; int param_len = 0; @@ -395,7 +395,7 @@ BOOL torture_nttrans_scan(int dummy) { static struct cli_state cli; int op, level; - char *fname = "\\scanner.dat"; + const char *fname = "\\scanner.dat"; int fnum, dnum; printf("starting nttrans scan test\n"); diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 49ddba52e1..5b25002213 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -24,7 +24,7 @@ static fstring host, workgroup, share, password, username, myname; static int max_protocol = PROTOCOL_NT1; -static char *sockops="TCP_NODELAY"; +static const char *sockops="TCP_NODELAY"; static int nprocs=1; int torture_numops=100; static int procnum; /* records process count number when forking */ @@ -32,7 +32,7 @@ static struct cli_state current_cli; static fstring randomfname; static BOOL use_oplocks; static BOOL use_level_II_oplocks; -static char *client_txt = "client_oplocks.txt"; +static const char *client_txt = "client_oplocks.txt"; static BOOL use_kerberos; BOOL torture_showall = False; @@ -221,7 +221,7 @@ static BOOL wait_lock(struct cli_state *c, int fnum, uint32 offset, uint32 len) static BOOL rw_torture(struct cli_state *c) { - char *lockfname = "\\torture.lck"; + const char *lockfname = "\\torture.lck"; fstring fname; int fnum; int fnum2; @@ -428,7 +428,7 @@ static BOOL rw_torture3(struct cli_state *c, char *lockfname) static BOOL rw_torture2(struct cli_state *c1, struct cli_state *c2) { - char *lockfname = "\\torture2.lck"; + const char *lockfname = "\\torture2.lck"; int fnum1; int fnum2; int i; @@ -554,7 +554,7 @@ static BOOL run_readwritelarge(int dummy) { static struct cli_state cli1; int fnum1; - char *lockfname = "\\large.dat"; + const char *lockfname = "\\large.dat"; size_t fsize; char buf[126*1024]; BOOL correct = True; @@ -782,7 +782,7 @@ static BOOL run_nbench(int dummy) static BOOL run_locktest1(int dummy) { static struct cli_state cli1, cli2; - char *fname = "\\lockt1.lck"; + const char *fname = "\\lockt1.lck"; int fnum1, fnum2, fnum3; time_t t1, t2; unsigned lock_timeout; @@ -893,7 +893,7 @@ static BOOL run_locktest1(int dummy) static BOOL run_tcon_test(int dummy) { static struct cli_state cli1; - char *fname = "\\tcontest.tmp"; + const char *fname = "\\tcontest.tmp"; int fnum1; uint16 cnum; char buf[4]; @@ -976,7 +976,7 @@ static BOOL run_tcon_test(int dummy) static BOOL run_locktest2(int dummy) { static struct cli_state cli; - char *fname = "\\lockt2.lck"; + const char *fname = "\\lockt2.lck"; int fnum1, fnum2, fnum3; BOOL correct = True; @@ -1112,7 +1112,7 @@ static BOOL run_locktest2(int dummy) static BOOL run_locktest3(int dummy) { static struct cli_state cli1, cli2; - char *fname = "\\lockt3.lck"; + const char *fname = "\\lockt3.lck"; int fnum1, fnum2, i; uint32 offset; BOOL correct = True; @@ -1237,7 +1237,7 @@ static BOOL run_locktest3(int dummy) static BOOL run_locktest4(int dummy) { static struct cli_state cli1, cli2; - char *fname = "\\lockt4.lck"; + const char *fname = "\\lockt4.lck"; int fnum1, fnum2, f; BOOL ret; char buf[1000]; @@ -1408,7 +1408,7 @@ static BOOL run_locktest4(int dummy) static BOOL run_locktest5(int dummy) { static struct cli_state cli1, cli2; - char *fname = "\\lockt5.lck"; + const char *fname = "\\lockt5.lck"; int fnum1, fnum2, fnum3; BOOL ret; char buf[1000]; @@ -1532,7 +1532,7 @@ static BOOL run_locktest5(int dummy) static BOOL run_locktest6(int dummy) { static struct cli_state cli; - char *fname[1] = { "\\lock6.txt" }; + const char *fname[1] = { "\\lock6.txt" }; int i; int fnum; NTSTATUS status; @@ -1576,7 +1576,7 @@ security hole) static BOOL run_fdpasstest(int dummy) { static struct cli_state cli1, cli2, cli3; - char *fname = "\\fdpass.tst"; + const char *fname = "\\fdpass.tst"; int fnum1; pstring buf; @@ -1631,7 +1631,7 @@ static BOOL run_fdpasstest(int dummy) static BOOL run_unlinktest(int dummy) { static struct cli_state cli; - char *fname = "\\unlink.tst"; + const char *fname = "\\unlink.tst"; int fnum; BOOL correct = True; @@ -1680,7 +1680,7 @@ test how many open files this server supports on the one socket static BOOL run_maxfidtest(int dummy) { static struct cli_state cli; - char *template = "\\maxfid.%d.%d"; + const char *template = "\\maxfid.%d.%d"; fstring fname; int fnums[0x11000], i; int retries=4; @@ -1866,7 +1866,7 @@ static BOOL run_attrtest(int dummy) static struct cli_state cli; int fnum; time_t t, t2; - char *fname = "\\attrib.tst"; + const char *fname = "\\attrib.tst"; BOOL correct = True; printf("starting attrib test\n"); @@ -1931,9 +1931,9 @@ static BOOL run_trans2test(int dummy) int fnum; size_t size; time_t c_time, a_time, m_time, w_time, m_time2; - char *fname = "\\trans2.tst"; - char *dname = "\\trans2"; - char *fname2 = "\\trans2\\trans2.tst"; + const char *fname = "\\trans2.tst"; + const char *dname = "\\trans2"; + const char *fname2 = "\\trans2\\trans2.tst"; pstring pname; BOOL correct = True; @@ -2083,7 +2083,7 @@ static BOOL run_w2ktest(int dummy) { static struct cli_state cli; int fnum; - char *fname = "\\w2ktest\\w2k.tst"; + const char *fname = "\\w2ktest\\w2k.tst"; int level; BOOL correct = True; @@ -2118,7 +2118,7 @@ static BOOL run_w2ktest(int dummy) static BOOL run_oplock1(int dummy) { static struct cli_state cli1; - char *fname = "\\lockt1.lck"; + const char *fname = "\\lockt1.lck"; int fnum1; BOOL correct = True; @@ -2167,7 +2167,7 @@ static BOOL run_oplock1(int dummy) static BOOL run_oplock2(int dummy) { static struct cli_state cli1, cli2; - char *fname = "\\lockt2.lck"; + const char *fname = "\\lockt2.lck"; int fnum1, fnum2; int saved_use_oplocks = use_oplocks; char buf[4]; @@ -2309,7 +2309,7 @@ static BOOL oplock3_handler(struct cli_state *cli, int fnum, unsigned char level static BOOL run_oplock3(int dummy) { static struct cli_state cli; - char *fname = "\\oplockt3.dat"; + const char *fname = "\\oplockt3.dat"; int fnum; char buf[4] = "abcd"; BOOL correct = True; @@ -2364,7 +2364,7 @@ static BOOL run_deletetest(int dummy) { static struct cli_state cli1; static struct cli_state cli2; - char *fname = "\\delete.file"; + const char *fname = "\\delete.file"; int fnum1 = -1; int fnum2 = -1; BOOL correct = True; @@ -2843,7 +2843,7 @@ static BOOL run_properties(int dummy) static BOOL run_xcopy(int dummy) { static struct cli_state cli1; - char *fname = "\\test.txt"; + const char *fname = "\\test.txt"; BOOL correct = True; int fnum1, fnum2; @@ -2885,8 +2885,8 @@ static BOOL run_xcopy(int dummy) static BOOL run_rename(int dummy) { static struct cli_state cli1; - char *fname = "\\test.txt"; - char *fname1 = "\\test1.txt"; + const char *fname = "\\test.txt"; + const char *fname1 = "\\test1.txt"; BOOL correct = True; int fnum1; @@ -3004,7 +3004,7 @@ static BOOL run_rename(int dummy) static BOOL run_pipe_number(int dummy) { static struct cli_state cli1; - char *pipe_name = "\\SPOOLSS"; + const char *pipe_name = "\\SPOOLSS"; int fnum; int num_pipes = 0; @@ -3037,7 +3037,7 @@ static BOOL run_opentest(int dummy) { static struct cli_state cli1; static struct cli_state cli2; - char *fname = "\\readonly.file"; + const char *fname = "\\readonly.file"; int fnum1, fnum2; char buf[20]; size_t fsize; @@ -3884,7 +3884,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) #define FLAG_MULTIPROC 1 static struct { - char *name; + const char *name; BOOL (*fn)(int); unsigned flags; } torture_ops[] = { @@ -3935,7 +3935,7 @@ static struct { /**************************************************************************** run a specified test or "ALL" ****************************************************************************/ -static BOOL run_test(char *name) +static BOOL run_test(const char *name) { BOOL ret = True; BOOL result = True; diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index c8250f15f8..78d22a07ac 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -403,7 +403,7 @@ static void process_file(struct vfs_state *pvfs, char *filename) { } } -void exit_server(char *reason) +void exit_server(const char *reason) { DEBUG(3,("Server exit (%s)\n", (reason ? reason : ""))); exit(0); @@ -484,7 +484,7 @@ int main(int argc, char *argv[]) extern BOOL AllowDebugChange; static struct vfs_state vfs; int i; - static char *filename = ""; + static const char *filename = ""; /* make sure the vars that get altered (4th field) are in a fixed location or certain compilers complain */ diff --git a/source3/torture/vfstest.h b/source3/torture/vfstest.h index b086faa402..5910c5ce37 100644 --- a/source3/torture/vfstest.h +++ b/source3/torture/vfstest.h @@ -37,9 +37,9 @@ struct vfs_state { }; struct cmd_set { - char *name; + const char *name; NTSTATUS (*fn)(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, char **argv); - char *description; - char *usage; + const char *description; + const char *usage; }; diff --git a/source3/ubiqx/debugparse.c b/source3/ubiqx/debugparse.c index 5da5280f19..195fc245bc 100644 --- a/source3/ubiqx/debugparse.c +++ b/source3/ubiqx/debugparse.c @@ -45,7 +45,7 @@ * Functions... */ -char *dbg_token2string( dbg_Token tok ) +const char *dbg_token2string( dbg_Token tok ) /* ------------------------------------------------------------------------ ** * Given a token, return a string describing the token. * diff --git a/source3/ubiqx/debugparse.h b/source3/ubiqx/debugparse.h index 9ed1777e95..458eee7455 100644 --- a/source3/ubiqx/debugparse.h +++ b/source3/ubiqx/debugparse.h @@ -62,7 +62,7 @@ typedef enum * Function prototypes... */ - char *dbg_token2string( dbg_Token tok ); + const char *dbg_token2string( dbg_Token tok ); /* ------------------------------------------------------------------------ ** * Given a token, return a string describing the token. * diff --git a/source3/utils/editreg.c b/source3/utils/editreg.c index 532dffe068..fe04052150 100644 --- a/source3/utils/editreg.c +++ b/source3/utils/editreg.c @@ -420,10 +420,10 @@ typedef struct key_sec_desc_s { * There should eventually be one to deal with security keys as well */ -typedef int (*key_print_f)(char *path, char *key_name, char *class_name, +typedef int (*key_print_f)(const char *path, char *key_name, char *class_name, int root, int terminal, int values); -typedef int (*val_print_f)(char *path, char *val_name, int val_type, +typedef int (*val_print_f)(const char *path, char *val_name, int val_type, int data_len, void *data_blk, int terminal, int first, int last); @@ -431,7 +431,7 @@ typedef int (*sec_print_f)(SEC_DESC *sec_desc); typedef struct regf_struct_s REGF; -int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, char *path, +int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, const char *path, key_print_f key_print, sec_print_f sec_print, val_print_f val_print); @@ -476,7 +476,7 @@ int nt_key_list_iterator(REGF *regf, KEY_LIST *key_list, int bf, char *path, return 1; } -int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, char *path, +int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, const char *path, key_print_f key_print, sec_print_f sec_print, val_print_f val_print) { @@ -875,10 +875,10 @@ typedef struct vk_struct { typedef struct _val_str { unsigned int val; - char * str; + const char * str; } VAL_STR; -VAL_STR reg_type_names[] = { +const VAL_STR reg_type_names[] = { { 1, "REG_SZ" }, { 2, "REG_EXPAND_SZ" }, { 3, "REG_BIN" }, @@ -887,7 +887,7 @@ VAL_STR reg_type_names[] = { { 0, NULL }, }; -char *val_to_str(unsigned int val, VAL_STR *val_array) +const char *val_to_str(unsigned int val, const VAL_STR *val_array) { int i = 0; @@ -1364,7 +1364,7 @@ VAL_KEY *process_vk(REGF *regf, VK_HDR *vk_hdr, int size) { char val_name[1024]; int nam_len, dat_len, flag, dat_type, dat_off, vk_id; - char *val_type; + const char *val_type; VAL_KEY *tmp = NULL; if (!vk_hdr) return NULL; @@ -1754,7 +1754,7 @@ int nt_load_registry(REGF *regf) * key print function here ... */ -int print_key(char *path, char *name, char *class_name, int root, +int print_key(const char *path, char *name, char *class_name, int root, int terminal, int vals) { @@ -1794,7 +1794,7 @@ int print_sec(SEC_DESC *sec_desc) /* * Value print function here ... */ -int print_val(char *path, char *val_name, int val_type, int data_len, +int print_val(const char *path, char *val_name, int val_type, int data_len, void *data_blk, int terminal, int first, int last) { char data_asc[1024]; diff --git a/source3/utils/net.c b/source3/utils/net.c index ba08feae19..34822670d1 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -56,10 +56,10 @@ /************************************************************************************/ /* Yes, these buggers are globals.... */ -char *opt_requester_name = NULL; -char *opt_host = NULL; -char *opt_password = NULL; -char *opt_user_name = NULL; +const char *opt_requester_name = NULL; +const char *opt_host = NULL; +const char *opt_password = NULL; +const char *opt_user_name = NULL; BOOL opt_user_specified = False; const char *opt_workgroup = NULL; int opt_long_list_entries = 0; @@ -67,11 +67,11 @@ int opt_reboot = 0; int opt_force = 0; int opt_port = 0; int opt_maxusers = -1; -char *opt_comment = ""; +const char *opt_comment = ""; int opt_flags = -1; int opt_jobid = 0; int opt_timeout = 0; -char *opt_target_workgroup = NULL; +const char *opt_target_workgroup = NULL; static int opt_machine_pass = 0; BOOL opt_have_ip = False; @@ -615,6 +615,7 @@ static struct functable net_func[] = { load_interfaces(); if (opt_machine_pass) { + char *user; /* it is very useful to be able to make ads queries as the machine account for testing purposes and for domain leave */ @@ -623,7 +624,8 @@ static struct functable net_func[] = { exit(1); } - asprintf(&opt_user_name,"%s$", global_myname()); + asprintf(&user,"%s$", global_myname()); + opt_user_name = user; opt_password = secrets_fetch_machine_password(); if (!opt_password) { d_printf("ERROR: Unable to fetch machine password\n"); diff --git a/source3/utils/net.h b/source3/utils/net.h index 86bdf2082e..6fa4bd6bce 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -37,20 +37,24 @@ extern int opt_maxusers; -extern char *opt_comment; +extern const char *opt_comment; extern int opt_flags; -extern char *opt_comment; +extern const char *opt_comment; -extern char *opt_target_workgroup; +extern const char *opt_target_workgroup; +extern const char *opt_workgroup; extern int opt_long_list_entries; extern int opt_reboot; extern int opt_force; extern int opt_timeout; -extern char *opt_host; -extern char *opt_user_name; -extern char *opt_password; +extern const char *opt_host; +extern const char *opt_user_name; +extern const char *opt_password; extern BOOL opt_user_specified; +extern BOOL opt_have_ip; +extern struct in_addr opt_dest_ip; + extern const char *share_type[]; diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 72dbe49c16..25b6f23d2d 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -544,8 +544,10 @@ static int net_ads_leave(int argc, const char **argv) } if (!opt_password) { - asprintf(&opt_user_name, "%s$", global_myname()); + char *user_name; + asprintf(&user_name, "%s$", global_myname()); opt_password = secrets_fetch_machine_password(); + opt_user_name = user_name; } if (!(ads = ads_startup())) { @@ -566,6 +568,7 @@ static int net_ads_leave(int argc, const char **argv) static int net_ads_join_ok(void) { + char *user_name; ADS_STRUCT *ads = NULL; if (!secrets_init()) { @@ -573,7 +576,8 @@ static int net_ads_join_ok(void) return -1; } - asprintf(&opt_user_name, "%s$", global_myname()); + asprintf(&user_name, "%s$", global_myname()); + opt_user_name = user_name; opt_password = secrets_fetch_machine_password(); if (!(ads = ads_startup())) { @@ -743,11 +747,10 @@ static int net_ads_printer_publish(int argc, const char **argv) { ADS_STRUCT *ads; ADS_STATUS rc; - char *servername; + const char *servername; struct cli_state *cli; struct in_addr server_ip; NTSTATUS nt_status; - extern char *opt_workgroup; TALLOC_CTX *mem_ctx = talloc_init("net_ads_printer_publish"); ADS_MODLIST mods = ads_init_mods(mem_ctx); char *prt_dn, *srv_dn, **srv_cn; @@ -853,8 +856,8 @@ static int net_ads_printer(int argc, const char **argv) static int net_ads_password(int argc, const char **argv) { ADS_STRUCT *ads; - char *auth_principal = opt_user_name; - char *auth_password = opt_password; + const char *auth_principal = opt_user_name; + const char *auth_password = opt_password; char *realm = NULL; char *new_password = NULL; char *c; @@ -902,13 +905,16 @@ static int net_ads_change_localhost_pass(int argc, const char **argv) char *host_principal; char *hostname; ADS_STATUS ret; + char *user_name; if (!secrets_init()) { DEBUG(1,("Failed to initialise secrets database\n")); return -1; } - asprintf(&opt_user_name, "%s$", global_myname()); + asprintf(&user_name, "%s$", global_myname()); + opt_user_name = user_name; + opt_password = secrets_fetch_machine_password(); if (!(ads = ads_startup())) { diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c index af0a6adbd2..8f3dd53fa6 100644 --- a/source3/utils/net_rap.c +++ b/source3/utils/net_rap.c @@ -204,7 +204,7 @@ static int rap_share_add(int argc, const char **argv) strlcpy(sinfo.share_name, sharename, sizeof(sinfo.share_name)); sinfo.reserved1 = '\0'; sinfo.share_type = 0; - sinfo.comment = opt_comment; + sinfo.comment = smb_xstrdup(opt_comment); sinfo.perms = 0; sinfo.maximum_users = opt_maxusers; sinfo.active_users = 0; @@ -644,7 +644,7 @@ static int rap_user_add(int argc, const char **argv) userinfo.userflags = opt_flags; userinfo.reserved1 = '\0'; - userinfo.comment = opt_comment; + userinfo.comment = smb_xstrdup(opt_comment); userinfo.priv = 1; userinfo.home_dir = NULL; userinfo.logon_script = NULL; @@ -757,7 +757,7 @@ static int rap_group_add(int argc, const char **argv) /* BB check for length 21 or smaller explicitly ? BB */ safe_strcpy(grinfo.group_name, argv[0], sizeof(grinfo.group_name)); grinfo.reserved1 = '\0'; - grinfo.comment = opt_comment; + grinfo.comment = smb_xstrdup(opt_comment); ret = cli_NetGroupAdd(cli, &grinfo); cli_shutdown(cli); diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 27ea23d183..60adcfdf6e 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1442,7 +1442,7 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - char *msg = "This machine will be shutdown shortly"; + const char *msg = "This machine will be shutdown shortly"; uint32 timeout = 20; #if 0 poptContext pc; @@ -1621,10 +1621,6 @@ static int rpc_trustdom_del(int argc, const char **argv) * @return Integer status (0 means success) **/ -extern char *opt_user_name; -extern char *opt_password; -extern char *opt_workgroup; - static int rpc_trustdom_establish(int argc, const char **argv) { struct cli_state *cli; @@ -1660,7 +1656,6 @@ static int rpc_trustdom_establish(int argc, const char **argv) * hence it should be set to remote domain name instead of ours */ if (opt_workgroup) { - SAFE_FREE(opt_workgroup); opt_workgroup = smb_xstrdup(domain_name); }; @@ -1861,18 +1856,13 @@ static NTSTATUS rpc_query_domain_sid(const DOM_SID *domain_sid, struct cli_state }; -extern char* opt_workgroup; -extern char* opt_target_worgroup; -extern char* opt_host; -extern char* opt_password; - static int rpc_trustdom_list(int argc, const char **argv) { /* common variables */ TALLOC_CTX* mem_ctx; struct cli_state *cli, *remote_cli; NTSTATUS nt_status; - char *domain_name = NULL; + const char *domain_name = NULL; DOM_SID queried_dom_sid; fstring ascii_sid, padding; int ascii_dom_name_len; @@ -1900,15 +1890,13 @@ static int rpc_trustdom_list(int argc, const char **argv) * set domain and pdc name to local samba server (default) * or to remote one given in command line */ - strupper(opt_workgroup); - if (strcmp(opt_workgroup, lp_workgroup())) { + + if (StrCaseCmp(opt_workgroup, lp_workgroup())) { domain_name = opt_workgroup; - if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup); opt_target_workgroup = opt_workgroup; } else { - safe_strcpy(pdc_name, global_myname(), FSTRING_LEN); + fstrcpy(pdc_name, global_myname()); domain_name = talloc_strdup(mem_ctx, lp_workgroup()); - if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup); opt_target_workgroup = domain_name; }; @@ -2060,7 +2048,6 @@ static int rpc_trustdom_list(int argc, const char **argv) /* set opt_* variables to remote domain */ strupper(trusting_dom_names[i]); opt_workgroup = talloc_strdup(mem_ctx, trusting_dom_names[i]); - if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup); opt_target_workgroup = opt_workgroup; d_printf("%s%s", trusting_dom_names[i], padding); diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index 4cf923b1f7..40619a0796 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -65,9 +65,6 @@ done: /* find the servers time on the opt_host host */ static time_t nettime(int *zone) { - extern BOOL opt_have_ip; - extern struct in_addr opt_dest_ip; - extern char *opt_host; return cli_servertime(opt_host, opt_have_ip? &opt_dest_ip : NULL, zone); } @@ -155,9 +152,6 @@ static int net_time_zone(int argc, const char **argv) int net_time(int argc, const char **argv) { time_t t; - extern BOOL opt_have_ip; - extern struct in_addr opt_dest_ip; - extern char *opt_host; struct functable func[] = { {"SYSTEM", net_time_system}, {"SET", net_time_set}, diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 8106134699..017efc60ae 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -121,7 +121,7 @@ static char *query_flags(int flags) /**************************************************************************** do a node status query ****************************************************************************/ -static void do_node_status(int fd, char *name, int type, struct in_addr ip) +static void do_node_status(int fd, const char *name, int type, struct in_addr ip) { struct nmb_name nname; int count, i, j; @@ -150,7 +150,7 @@ static void do_node_status(int fd, char *name, int type, struct in_addr ip) /**************************************************************************** send out one query ****************************************************************************/ -static BOOL query_one(char *lookup, unsigned int lookup_type) +static BOOL query_one(const char *lookup, unsigned int lookup_type) { int j, count, flags = 0; struct in_addr *ip_list=NULL; diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index e710a8c0d0..44f97fded2 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -297,7 +297,7 @@ BOOL hex_decode(const char *hex_buf_in, unsigned char **out_buffer, size_t *size size_t hex_buf_in_len = strlen(hex_buf_in); unsigned char partial_byte_hex; unsigned char partial_byte; - char *hexchars = "0123456789ABCDEF"; + const char *hexchars = "0123456789ABCDEF"; char *p; BOOL high = True; diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 90ce3a6890..c229d100ca 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -231,7 +231,10 @@ static int print_users_list (struct pdb_context *in, BOOL verbosity, BOOL smbpwd Set User Info **********************************************************/ -static int set_user_info (struct pdb_context *in, char *username, char *fullname, char *homedir, char *drive, char *script, char *profile) +static int set_user_info (struct pdb_context *in, const char *username, + const char *fullname, const char *homedir, + const char *drive, const char *script, + const char *profile) { SAM_ACCOUNT *sam_pwent=NULL; BOOL ret; @@ -270,7 +273,7 @@ static int set_user_info (struct pdb_context *in, char *username, char *fullname /********************************************************* Add New User **********************************************************/ -static int new_user (struct pdb_context *in, char *username, char *fullname, char *homedir, char *drive, char *script, char *profile) +static int new_user (struct pdb_context *in, const char *username, const char *fullname, const char *homedir, const char *drive, const char *script, const char *profile) { SAM_ACCOUNT *sam_pwent=NULL; struct passwd *pwd = NULL; @@ -339,26 +342,27 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha Add New Machine **********************************************************/ -static int new_machine (struct pdb_context *in, char *machinename) +static int new_machine (struct pdb_context *in, const char *machine_in) { SAM_ACCOUNT *sam_pwent=NULL; + fstring machinename; char name[16]; - char *password = NULL; if (!NT_STATUS_IS_OK(pdb_init_sam (&sam_pwent))) { return -1; } + fstrcpy(machinename, machine_in); + if (machinename[strlen (machinename) -1] == '$') machinename[strlen (machinename) -1] = '\0'; + strlower_m(machinename); + safe_strcpy (name, machinename, 16); safe_strcat (name, "$", 16); - - string_set (&password, machinename); - strlower_m(password); - - pdb_set_plaintext_passwd (sam_pwent, password); + + pdb_set_plaintext_passwd (sam_pwent, machinename); pdb_set_username (sam_pwent, name, PDB_CHANGED); @@ -381,7 +385,7 @@ static int new_machine (struct pdb_context *in, char *machinename) Delete user entry **********************************************************/ -static int delete_user_entry (struct pdb_context *in, char *username) +static int delete_user_entry (struct pdb_context *in, const char *username) { SAM_ACCOUNT *samaccount = NULL; @@ -401,7 +405,7 @@ static int delete_user_entry (struct pdb_context *in, char *username) Delete machine entry **********************************************************/ -static int delete_machine_entry (struct pdb_context *in, char *machinename) +static int delete_machine_entry (struct pdb_context *in, const char *machinename) { char name[16]; SAM_ACCOUNT *samaccount = NULL; @@ -438,7 +442,7 @@ int main (int argc, char **argv) uint32 setparms, checkparms; int opt; static char *full_name = NULL; - static char *user_name = NULL; + static const char *user_name = NULL; static char *home_dir = NULL; static char *home_drive = NULL; static char *backend = NULL; diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index de18bd0534..9424233e11 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -496,7 +496,7 @@ void process_sid(DOM_SID *sid, DOM_SID *o_sid, DOM_SID *n_sid) } -void process_acl(ACL *acl, char *prefix) +void process_acl(ACL *acl, const char *prefix) { int ace_cnt, i; ACE *ace; diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 07b2aa7fec..e41edcf6f8 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -43,13 +43,13 @@ enum chown_mode {REQUEST_NONE, REQUEST_CHOWN, REQUEST_CHGRP}; enum exit_values {EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR}; struct perm_value { - char *perm; + const char *perm; uint32 mask; }; /* These values discovered by inspection */ -static struct perm_value special_values[] = { +static const struct perm_value special_values[] = { { "R", 0x00120089 }, { "W", 0x00120116 }, { "X", 0x001200a0 }, @@ -59,7 +59,7 @@ static struct perm_value special_values[] = { { NULL, 0 }, }; -static struct perm_value standard_values[] = { +static const struct perm_value standard_values[] = { { "READ", 0x001200a9 }, { "CHANGE", 0x001301bf }, { "FULL", 0x001f01ff }, @@ -70,7 +70,7 @@ static struct cli_state *global_hack_cli; static POLICY_HND pol; static BOOL got_policy_hnd; -static struct cli_state *connect_one(char *share); +static struct cli_state *connect_one(const char *share); /* Open cli connection and policy handle */ @@ -161,7 +161,7 @@ static BOOL StringToSid(DOM_SID *sid, const char *str) /* print an ACE on a FILE, using either numeric or ascii representation */ static void print_ace(FILE *f, SEC_ACE *ace) { - struct perm_value *v; + const struct perm_value *v; fstring sidstr; int do_print = 0; uint32 got_mask; @@ -234,7 +234,7 @@ static BOOL parse_ace(SEC_ACE *ace, char *str) unsigned atype, aflags, amask; DOM_SID sid; SEC_ACCESS mask; - struct perm_value *v; + const struct perm_value *v; ZERO_STRUCTP(ace); p = strchr_m(str,':'); @@ -708,7 +708,7 @@ static int cacl_set(struct cli_state *cli, char *filename, /***************************************************** return a connection to a server *******************************************************/ -static struct cli_state *connect_one(char *share) +static struct cli_state *connect_one(const char *share) { struct cli_state *c; struct in_addr ip; diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index f4d197147f..10ebf019c5 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -24,8 +24,8 @@ extern BOOL AllowDebugChange; -static struct { - char *name; +static const struct { + const char *name; int value; } msg_types[] = { {"debug", MSG_DEBUG}, @@ -149,7 +149,7 @@ Prints out the current Profile level returned by MSG_PROFILELEVEL void profilelevel_function(int msg_type, pid_t src, void *buf, size_t len) { int level; - char *s=NULL; + const char *s=NULL; memcpy(&level, buf, sizeof(int)); if (level) { diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index bcb5629f21..577e467fbd 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -33,7 +33,7 @@ static BOOL got_pass = False, got_username = False; static BOOL stdin_passwd_get = False; static fstring user_name, user_password; static char *new_passwd = NULL; -static char *remote_machine = NULL; +static const char *remote_machine = NULL; static fstring ldap_secret; @@ -241,7 +241,7 @@ static char *stdin_new_passwd(void) Used if the '-s' option is set to silently get passwords to enable scripting. *************************************************************/ -static char *get_pass( char *prompt, BOOL stdin_get) +static char *get_pass( const char *prompt, BOOL stdin_get) { char *p; if (stdin_get) { diff --git a/source3/utils/testprns.c b/source3/utils/testprns.c index 1c13bb4ce3..7e52b86afb 100644 --- a/source3/utils/testprns.c +++ b/source3/utils/testprns.c @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) { - char *pszTemp; + const char *pszTemp; setup_logging(argv[0],True); diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 96520c0eef..018dd3602f 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -40,7 +40,7 @@ static int num_variables; static int content_length; static int request_post; static char *query_string; -static char *baseurl; +static const char *baseurl; static char *pathinfo; static char *C_user; static BOOL inetd_server; @@ -205,7 +205,7 @@ void cgi_load_variables(void) browser. Also doesn't allow for variables[] containing multiple variables with the same name and the same or different values. ***************************************************************************/ -char *cgi_variable(char *name) +const char *cgi_variable(const char *name) { int i; @@ -218,7 +218,7 @@ char *cgi_variable(char *name) /*************************************************************************** tell a browser about a fatal error in the http processing ***************************************************************************/ -static void cgi_setup_error(char *err, char *header, char *info) +static void cgi_setup_error(const char *err, const char *header, const char *info) { if (!got_request) { /* damn browsers don't like getting cut off before they give a request */ @@ -264,10 +264,10 @@ authenticate when we are running as a CGI ***************************************************************************/ static void cgi_web_auth(void) { - char *user = getenv("REMOTE_USER"); + const char *user = getenv("REMOTE_USER"); struct passwd *pwd; - char *head = "Content-Type: text/html\r\n\r\n

SWAT installation Error

\n"; - char *tail = "\r\n"; + const char *head = "Content-Type: text/html\r\n\r\n

SWAT installation Error

\n"; + const char *tail = "\r\n"; if (!user) { printf("%sREMOTE_USER not set. Not authenticated by web server.
%s\n", @@ -296,7 +296,7 @@ decode a base64 string in-place - simple and slow algorithm ***************************************************************************/ static void base64_decode(char *s) { - char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int bit_offset, byte_offset, idx, i, n; unsigned char *d = (unsigned char *)s; char *p; @@ -570,7 +570,7 @@ void cgi_setup(const char *rootdir, int auth_required) /*************************************************************************** return the current pages URL ***************************************************************************/ -char *cgi_baseurl(void) +const char *cgi_baseurl(void) { if (inetd_server) { return baseurl; @@ -581,7 +581,7 @@ char *cgi_baseurl(void) /*************************************************************************** return the current pages path info ***************************************************************************/ -char *cgi_pathinfo(void) +const char *cgi_pathinfo(void) { char *r; if (inetd_server) { diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index 3b597d44c0..8e41d62cb0 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -216,7 +216,7 @@ static int traverse_fn3(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st /* show the current server status */ void status_page(void) { - char *v; + const char *v; int autorefresh=0; int refresh_interval=30; TDB_CONTEXT *tdb; diff --git a/source3/web/swat.c b/source3/web/swat.c index fc38852245..21ae104cef 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -59,7 +59,7 @@ static int iNumNonAutoPrintServices = 0; /**************************************************************************** ****************************************************************************/ -static int enum_index(int value, struct enum_list *enumlist) +static int enum_index(int value, const struct enum_list *enumlist) { int i; for (i=0;enumlist[i].name;i++) @@ -67,7 +67,7 @@ static int enum_index(int value, struct enum_list *enumlist) return(i); } -static char *fix_backslash(char *str) +static char *fix_backslash(const char *str) { static char newstring[1024]; char *p = newstring; @@ -81,7 +81,7 @@ static char *fix_backslash(char *str) return newstring; } -static char *stripspaceupper(char *str) +static char *stripspaceupper(const char *str) { static char newstring[1024]; char *p = newstring; @@ -94,7 +94,7 @@ static char *stripspaceupper(char *str) return newstring; } -static char *make_parm_name(char *label) +static char *make_parm_name(const char *label) { static char parmname[1024]; char *p = parmname; @@ -111,7 +111,7 @@ static char *make_parm_name(char *label) /**************************************************************************** include a lump of html in a page ****************************************************************************/ -static int include_html(char *fname) +static int include_html(const char *fname) { int fd; char buf[1024]; @@ -303,8 +303,8 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte { int i = 0; struct parm_struct *parm; - char *heading = NULL; - char *last_heading = NULL; + const char *heading = NULL; + const char *last_heading = NULL; while ((parm = lp_next_parameter(snum, &i, allparameters))) { if (snum < 0 && parm->class == P_LOCAL && !(parm->flags & FLAG_GLOBAL)) @@ -440,7 +440,7 @@ static int save_reload(int snum) /**************************************************************************** commit one parameter ****************************************************************************/ -static void commit_parameter(int snum, struct parm_struct *parm, char *v) +static void commit_parameter(int snum, struct parm_struct *parm, const char *v) { int i; char *s; @@ -468,7 +468,7 @@ static void commit_parameters(int snum) int i = 0; struct parm_struct *parm; pstring label; - char *v; + const char *v; while ((parm = lp_next_parameter(snum, &i, 1))) { slprintf(label, sizeof(label)-1, "parm_%s", make_parm_name(parm->label)); @@ -817,7 +817,7 @@ static void globals_page(void) ****************************************************************************/ static void shares_page(void) { - char *share = cgi_variable("share"); + const char *share = cgi_variable("share"); char *s; int snum = -1; int i; @@ -915,8 +915,8 @@ static void shares_page(void) /************************************************************* change a password either locally or remotely *************************************************************/ -static BOOL change_password(const char *remote_machine, char *user_name, - char *old_passwd, char *new_passwd, +static BOOL change_password(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, int local_flags) { BOOL ret = False; @@ -957,7 +957,7 @@ static BOOL change_password(const char *remote_machine, char *user_name, ****************************************************************************/ static void chg_passwd(void) { - char *host; + const char *host; BOOL rslt; int local_flags = 0; @@ -1042,7 +1042,7 @@ static void chg_passwd(void) ****************************************************************************/ static void passwd_page(void) { - char *new_name = cgi_user_name(); + const char *new_name = cgi_user_name(); /* * After the first time through here be nice. If the user @@ -1147,7 +1147,7 @@ static void passwd_page(void) ****************************************************************************/ static void printers_page(void) { - char *share = cgi_variable("share"); + const char *share = cgi_variable("share"); char *s; int snum=-1; int i; diff --git a/source3/wrepld/server.c b/source3/wrepld/server.c index 144a5b570c..e39fb148d6 100644 --- a/source3/wrepld/server.c +++ b/source3/wrepld/server.c @@ -135,7 +135,7 @@ static BOOL dump_core(void) /**************************************************************************** exit the server ****************************************************************************/ -void exit_server(char *reason) +void exit_server(const char *reason) { static int firsttime=1; -- cgit