dir.c revision f8f8a5b3a33f581c6e209c7ded8168e7acc73dfb
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley/*
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * Copyright (C) 1999-2001 Internet Software Consortium.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley *
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * Permission to use, copy, modify, and/or distribute this software for any
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * purpose with or without fee is hereby granted, provided that the above
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * copyright notice and this permission notice appear in all copies.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley *
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * PERFORMANCE OF THIS SOFTWARE.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
110d1702731f42dd620879c1d765ebe91f3920ceMichael Graff/* $Id: dir.c,v 1.27 2008/12/01 23:47:45 tbox Exp $ */
110d1702731f42dd620879c1d765ebe91f3920ceMichael Graff
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley/*! \file
54f959d12b5a1f9315fbf6a776c6d349316e9686Bob Halley * \author Principal Authors: DCL */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <config.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
54f959d12b5a1f9315fbf6a776c6d349316e9686Bob Halley#include <sys/types.h>
0d0d9a9d9895605aba3a44fd03c051e15f88ecf5Bob Halley#include <sys/stat.h>
0d0d9a9d9895605aba3a44fd03c051e15f88ecf5Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <ctype.h>
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews#include <errno.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <unistd.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <isc/dir.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <isc/magic.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <isc/string.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include <isc/util.h>
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#include "errno2result.h"
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#define ISC_DIR_MAGIC ISC_MAGIC('D', 'I', 'R', '*')
078d49b63324f01d98301ee21671abee0c41fcdeBob Halley#define VALID_DIR(dir) ISC_MAGIC_VALID(dir, ISC_DIR_MAGIC)
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyvoid
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halleyisc_dir_init(isc_dir_t *dir) {
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley REQUIRE(dir != NULL);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
ca67883a666bdf314d3da958d5195e7215b1f797Bob Halley dir->entry.name[0] = '\0';
b12f0228b32775ee688ed21ddbf3a116c1adfb43Michael Graff dir->entry.length = 0;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley dir->handle = NULL;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
e496615043400500492fa7b891c515c8e7cb7d08Bob Halley dir->magic = ISC_DIR_MAGIC;
e496615043400500492fa7b891c515c8e7cb7d08Bob Halley}
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley/*!
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * \brief Allocate workspace and open directory stream. If either one fails,
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * NULL will be returned.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_result_t
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_dir_open(isc_dir_t *dir, const char *dirname) {
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley char *p;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley isc_result_t result = ISC_R_SUCCESS;
078d49b63324f01d98301ee21671abee0c41fcdeBob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley REQUIRE(VALID_DIR(dir));
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley REQUIRE(dirname != NULL);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley /*
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley * Copy directory name. Need to have enough space for the name,
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * a possible path separator, the wildcard, and the final NUL.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley */
ca67883a666bdf314d3da958d5195e7215b1f797Bob Halley if (strlen(dirname) + 3 > sizeof(dir->dirname))
b12f0228b32775ee688ed21ddbf3a116c1adfb43Michael Graff /* XXXDCL ? */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (ISC_R_NOSPACE);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley strcpy(dir->dirname, dirname);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
e496615043400500492fa7b891c515c8e7cb7d08Bob Halley /*
e496615043400500492fa7b891c515c8e7cb7d08Bob Halley * Append path separator, if needed, and "*".
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley p = dir->dirname + strlen(dir->dirname);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley if (dir->dirname < p && *(p - 1) != '/')
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley *p++ = '/';
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley *p++ = '*';
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley *p++ = '\0';
2cd0c38115b1efb043ed3104c0d08e51ceade0d7Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley /*
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * Open stream.
078d49b63324f01d98301ee21671abee0c41fcdeBob Halley */
0180ccf72c79b98eb8ee5abbb7331aec6951dd9fBob Halley dir->handle = opendir(dirname);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley if (dir->handle == NULL)
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return isc__errno2result(errno);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley return (result);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley}
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
ca67883a666bdf314d3da958d5195e7215b1f797Bob Halley/*!
b12f0228b32775ee688ed21ddbf3a116c1adfb43Michael Graff * \brief Return previously retrieved file or get next one.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * Unix's dirent has
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley * separate open and read functions, but the Win32 and DOS interfaces open
e496615043400500492fa7b891c515c8e7cb7d08Bob Halley * the dir stream and reads the first file in one operation.
e496615043400500492fa7b891c515c8e7cb7d08Bob Halley */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_result_t
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_dir_read(isc_dir_t *dir) {
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley struct dirent *entry;
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley REQUIRE(VALID_DIR(dir) && dir->handle != NULL);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley /*
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley * Fetch next file in directory.
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley entry = readdir(dir->handle);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley if (entry == NULL)
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley return (ISC_R_NOMORE);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley /*
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley * Make sure that the space for the name is long enough.
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley if (sizeof(dir->entry.name) <= strlen(entry->d_name))
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley return (ISC_R_UNEXPECTED);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley strcpy(dir->entry.name, entry->d_name);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley /*
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley * Some dirents have d_namlen, but it is not portable.
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley dir->entry.length = strlen(entry->d_name);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley return (ISC_R_SUCCESS);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley}
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley/*!
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley * \brief Close directory stream.
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halleyvoid
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halleyisc_dir_close(isc_dir_t *dir) {
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley REQUIRE(VALID_DIR(dir) && dir->handle != NULL);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley (void)closedir(dir->handle);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley dir->handle = NULL;
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley}
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley/*!
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley * \brief Reposition directory stream at start.
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halleyisc_result_t
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halleyisc_dir_reset(isc_dir_t *dir) {
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley REQUIRE(VALID_DIR(dir) && dir->handle != NULL);
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley rewinddir(dir->handle);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (ISC_R_SUCCESS);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley}
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_result_t
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_dir_chdir(const char *dirname) {
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley /*!
078d49b63324f01d98301ee21671abee0c41fcdeBob Halley * \brief Change the current directory to 'dirname'.
0180ccf72c79b98eb8ee5abbb7331aec6951dd9fBob Halley */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley REQUIRE(dirname != NULL);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley if (chdir(dirname) < 0)
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (isc__errno2result(errno));
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (ISC_R_SUCCESS);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley}
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_result_t
5619558151f1aa4249b3ead979e76876e29278b6Bob Halleyisc_dir_chroot(const char *dirname) {
078d49b63324f01d98301ee21671abee0c41fcdeBob Halley
0180ccf72c79b98eb8ee5abbb7331aec6951dd9fBob Halley REQUIRE(dirname != NULL);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#ifdef HAVE_CHROOT
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley if (chroot(dirname) < 0)
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (isc__errno2result(errno));
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (ISC_R_SUCCESS);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#else
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley return (ISC_R_NOTIMPLEMENTED);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley#endif
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley}
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
078d49b63324f01d98301ee21671abee0c41fcdeBob Halleyisc_result_t
0180ccf72c79b98eb8ee5abbb7331aec6951dd9fBob Halleyisc_dir_createunique(char *templet) {
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley isc_result_t result;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley char *x;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley char *p;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley int i;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley int pid;
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley REQUIRE(templet != NULL);
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
ccbfddc70ef38263daca312d29bb8c5077e24785Bob Halley /*!
8d6024e7cffbd84fa8d06ce50c60307d7b3b49c2Michael Graff * \brief mkdtemp is not portable, so this emulates it.
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley */
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff pid = getpid();
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff
ccbfddc70ef38263daca312d29bb8c5077e24785Bob Halley /*
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews * Replace trailing Xs with the process-id, zero-filled.
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews */
69be7837c920fac5c71a73e8fad586f9a2711e96Michael Graff for (x = templet + strlen(templet) - 1; *x == 'X' && x >= templet;
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley x--, pid /= 10)
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley *x = pid % 10 + '0';
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley x++; /* Set x to start of ex-Xs. */
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley do {
5619558151f1aa4249b3ead979e76876e29278b6Bob Halley i = mkdir(templet, 0700);
54f959d12b5a1f9315fbf6a776c6d349316e9686Bob Halley if (i == 0 || errno != EEXIST)
ccbfddc70ef38263daca312d29bb8c5077e24785Bob Halley break;
54f959d12b5a1f9315fbf6a776c6d349316e9686Bob Halley
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley /*
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley * The BSD algorithm.
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley p = x;
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley while (*p != '\0') {
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley if (isdigit(*p & 0xff))
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley *p = 'a';
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley else if (*p != 'z')
ccbfddc70ef38263daca312d29bb8c5077e24785Bob Halley ++*p;
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff else {
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff /*
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff * Reset character and move to next.
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff */
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews *p++ = 'a';
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews continue;
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews }
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews break;
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff }
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews
c1e7aff941dbf40090fec49300e728ad017d4f0cMark Andrews if (*p == '\0') {
c1e7aff941dbf40090fec49300e728ad017d4f0cMark Andrews /*
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews * Tried all combinations. errno should already
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff * be EEXIST, but ensure it is anyway for
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews * isc__errno2result().
69be7837c920fac5c71a73e8fad586f9a2711e96Michael Graff */
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley errno = EEXIST;
69be7837c920fac5c71a73e8fad586f9a2711e96Michael Graff break;
69be7837c920fac5c71a73e8fad586f9a2711e96Michael Graff }
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff } while (1);
69be7837c920fac5c71a73e8fad586f9a2711e96Michael Graff
c1e7aff941dbf40090fec49300e728ad017d4f0cMark Andrews if (i == -1)
c1e7aff941dbf40090fec49300e728ad017d4f0cMark Andrews result = isc__errno2result(errno);
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews else
76883e8cee593f45c65b0936e5d6e8f778d6e3efMichael Graff result = ISC_R_SUCCESS;
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews
22f735acbce7ffe95af20bb58bb8929b6f1d674fMichael Graff return (result);
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley}
bf345589ce0b0b64533d4566e4992a0e63aac6f5Bob Halley