/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <errno.h>
#include <thread.h>
#include <synch.h>
#include "libfsmgt.h"
#include "sharetab.h"
/*
* Private variables
*/
/*
* Private method declarations
*/
int *errp);
/*
* Public methods
*/
void
{
}
}
/*
*/
{
(void) mutex_lock(&sharetab_lock);
/*
* Out of memory
*/
(void) mutex_unlock(&sharetab_lock);
return (NULL);
}
} else {
}
} /* while (getshare(fp, &sharetab_entry) != 0) */
(void) mutex_unlock(&sharetab_lock);
} else {
} /* if ((fp = fopen(SHARETAB, "r")) != NULL) */
/*
* Caller must free the mount list
*/
return (headp);
} /* fs_get_share_list */
/*
* fs_parse_opts_for_sec_modes
* Get an array of strings of all the security modes of the option string.
*
* char *cmd - The option string from the share command.
* int *count - pointer to the number of elements in the returned array.
* int *error - error pointer for returning any errors.
*/
char **
{
char *temp_str;
char **secstringarray;
char *strptr;
*count = 0;
return (NULL);
}
if (secstringarray == NULL) {
return (NULL);
}
char *next_str;
}
}
if (*count > 0) {
secstringarray, *count);
} else {
}
return (NULL);
}
(*count)++;
}
}
} else {
if (*count > 0) {
secstringarray, *count);
} else {
}
return (NULL);
}
(*count)++;
}
return (secstringarray);
}
/*
* fs_create_array_from_accesslist
* Takes the colon seperated access list parses the list into an array
* containing all the elements of the list. The array created is returned
* and count is set to the number of elements in the array.
*
* char *access_list - The string containing the colon sperated access list.
* int *count - Will contain the number of elements in the array.
* int *err - any errors encountered.
*/
char **
{
char *server_string;
char *list_copy;
*count = 0;
if (access_list != NULL) {
if (server_string != NULL) {
while (server_string != NULL) {
err)) {
list_array, *count);
goto return_err;
}
}
} else {
sizeof (char *));
if (list_array == NULL) {
goto return_err;
}
list_array = NULL;
goto return_err;
}
(*count)++;
}
} else {
}
}
return (list_array);
} /* fs_create_array_from_accesslist */
/*
* Private Methods
*/
{
(size_t)sizeof (fs_sharelist_t));
/*
* Out of memory
*/
return (NULL);
}
/*
* Out of memory
*/
return (NULL);
}
/*
* Out of memory
*/
return (NULL);
}
/*
* Out of memory
*/
return (NULL);
}
/*
* Out of memory
*/
return (NULL);
}
/*
* Out of memory
*/
return (NULL);
}
return (newp);
} /* create_sharelist_entry */