The branch, v3-2-stable has been updated via d89ba32c49049ae105b02b2cea578605a13a7afb (commit) via ce92c96a3e80409b6dca7ef0198400403d72b7d4 (commit) from 3202012836cc25b6981bced9c9fa12458df0de9d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable - Log ----------------------------------------------------------------- commit d89ba32c49049ae105b02b2cea578605a13a7afb Author: Karolin Seeger <[EMAIL PROTECTED]> Date: Wed Sep 17 08:48:19 2008 +0200 find_missing_manpages.pl: Adapt script to changed directory structure. Karolin (cherry picked from commit b6b7aa023b62ab8994d13cb91d5185204c1500b2) (cherry picked from commit d553faff4ae9aa1fdc1bb716e901dcede7799f27) commit ce92c96a3e80409b6dca7ef0198400403d72b7d4 Author: Jeremy Allison <[EMAIL PROTECTED]> Date: Wed Sep 17 11:59:18 2008 -0700 Ensure all pointers are initialized. Without this we can crash when looking up a non-existant uid. Jeremy. (cherry picked from commit a31b006a411266adf49d2eefd1f80bbb091f0c4c) ----------------------------------------------------------------------- Summary of changes: docs-xml/scripts/find_missing_manpages.pl | 27 ++++++++++++++----- source/services/services_db.c | 40 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 27 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/scripts/find_missing_manpages.pl b/docs-xml/scripts/find_missing_manpages.pl index c468d7d..aa5751b 100755 --- a/docs-xml/scripts/find_missing_manpages.pl +++ b/docs-xml/scripts/find_missing_manpages.pl @@ -1,14 +1,25 @@ #!/usr/bin/perl -my %doc; - $invar = 0; - $topdir = (shift @ARGV) or $topdir = "."; - +$makefile = "$topdir/source/Makefile.in"; +$mandir = "$topdir/docs-xml/manpages-3"; $progs = ""; -open(IN, "$topdir/Makefile.in"); +chdir($topdir); + +if(! -e "$makefile") { + print "$makefile does not exist!\n"; + print "Wrong directory?\n"; + exit(1); +} + +if(! -d "$mandir") { + print "$mandir does not exist!\n"; + exit(1); +} + +open(IN, "$makefile"); while(<IN>) { if($invar && /^([ \t]*)(.*?)([\\])$/) { $progs.=" " . $2; @@ -22,15 +33,17 @@ while(<IN>) { foreach(split(/bin\//, $progs)) { next if($_ eq " "); s/[EMAIL PROTECTED]@//g; + s/[EMAIL PROTECTED]@//g; s/ //g; $f = $_; - + $found = 0; + for($i = 0; $i < 9; $i++) { - if(-e "manpages/$f.$i.xml") { $found = 1; } + if(-e "$mandir/$f.$i.xml") { $found = 1; } } if(!$found) { diff --git a/source/services/services_db.c b/source/services/services_db.c index 620b036..56e76a3 100644 --- a/source/services/services_db.c +++ b/source/services/services_db.c @@ -91,8 +91,8 @@ static SEC_DESC* construct_service_sd( TALLOC_CTX *ctx ) SEC_ACE ace[4]; SEC_ACCESS mask; size_t i = 0; - SEC_DESC *sd; - SEC_ACL *acl; + SEC_DESC *sd = NULL; + SEC_ACL *acl = NULL; size_t sd_size; /* basic access for Everyone */ @@ -188,11 +188,11 @@ static char *cleanup_string( const char *string ) static bool read_init_file( const char *servicename, struct rcinit_file_information **service_info ) { - struct rcinit_file_information *info; + struct rcinit_file_information *info = NULL; char *filepath = NULL; char str[1024]; - XFILE *f; - char *p; + XFILE *f = NULL; + char *p = NULL; if ( !(info = TALLOC_ZERO_P( NULL, struct rcinit_file_information ) ) ) return False; @@ -335,12 +335,12 @@ static void fill_service_values( const char *name, REGVAL_CTR *values ) static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys, const char *name ) { - REGISTRY_KEY *key_service, *key_secdesc; + REGISTRY_KEY *key_service = NULL, *key_secdesc = NULL; WERROR wresult; char *path = NULL; - REGVAL_CTR *values; - REGSUBKEY_CTR *svc_subkeys; - SEC_DESC *sd; + REGVAL_CTR *values = NULL; + REGSUBKEY_CTR *svc_subkeys = NULL; + SEC_DESC *sd = NULL; DATA_BLOB sd_blob; NTSTATUS status; @@ -444,7 +444,7 @@ void svcctl_init_keys( void ) { const char **service_list = lp_svcctl_list(); int i; - REGSUBKEY_CTR *subkeys; + REGSUBKEY_CTR *subkeys = NULL; REGISTRY_KEY *key = NULL; WERROR wresult; @@ -502,9 +502,9 @@ void svcctl_init_keys( void ) SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token ) { - REGISTRY_KEY *key; - REGVAL_CTR *values; - REGISTRY_VALUE *val; + REGISTRY_KEY *key = NULL; + REGVAL_CTR *values = NULL; + REGISTRY_VALUE *val = NULL; SEC_DESC *ret_sd = NULL; char *path= NULL; WERROR wresult; @@ -563,10 +563,10 @@ done: bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token ) { - REGISTRY_KEY *key; + REGISTRY_KEY *key = NULL; WERROR wresult; char *path = NULL; - REGVAL_CTR *values; + REGVAL_CTR *values = NULL; prs_struct ps; bool ret = False; @@ -620,8 +620,8 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO { char *display_name = NULL; REGISTRY_KEY *key = NULL; - REGVAL_CTR *values; - REGISTRY_VALUE *val; + REGVAL_CTR *values = NULL; + REGISTRY_VALUE *val = NULL; char *path = NULL; WERROR wresult; @@ -670,8 +670,8 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER { char *description = NULL; REGISTRY_KEY *key = NULL; - REGVAL_CTR *values; - REGISTRY_VALUE *val; + REGVAL_CTR *values = NULL; + REGISTRY_VALUE *val = NULL; char *path = NULL; WERROR wresult; @@ -715,7 +715,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token ) { REGISTRY_KEY *key = NULL; - REGVAL_CTR *values; + REGVAL_CTR *values = NULL; char *path = NULL; WERROR wresult; -- Samba Shared Repository