123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- /**
- * Get the full path of the configuration file.
- * Use $HADOOP_SECURITY_CONF_DIR for the configuration directory, and if
- * it's not set, use the default value in default_conf_dir.
- */
- void get_config_path(char* conf_file_path, int size,
- char* default_conf_dir,
- const char* conf_file_name);
- /**
- * Ensure that the configuration file and all of the containing directories
- * are only writable by root. Otherwise, an attacker can change the
- * configuration and potentially cause damage.
- * returns 0 if permissions are ok
- */
- int check_configuration_permissions(const char* file_name);
- // read the given configuration file
- void read_config(const char* config_file);
- //method exposed to get the configurations
- char *get_value(const char* key);
- //function to return array of values pointing to the key. Values are
- //comma seperated strings.
- char ** get_values(const char* key);
- // Extracts array of values from the comma separated list of values.
- char ** extract_values(char * value);
- // free the memory returned by get_values
- void free_values(char** values);
- //method to free allocated configuration
- void free_configurations();
|