GLOBUS_GSI_SYSCONFIG_GET_USER_ID_STRING_UNIX(3)
πΈ globus_gsi_sysconfig_check_certfile_uid_unix(3) β Library Functions Manual πΈ
okay bestie, gather round, we're reading a library functions manual page and honestly? it's giving essential. this is part 1 of 2, so don't go anywhere, there's more coming. the page you're on right now is globus_gsi_sysconfig_check_certfile_uid_unix(3) but the whole family is the globus_gsi_sysconfig_unix crew, and they are so important.
β¨ NAME β¨
globus_gsi_sysconfig_unix β Functions for UNIX platforms
- Functions for UNIX platforms.
π¦ SYNOPSIS π¦
π Functions
globus_result_t globus_gsi_sysconfig_set_key_permissions_unix(char *filename)β UNIX - Set Key Permissions.globus_result_t globus_gsi_sysconfig_get_user_id_string_unix(char **user_id_string)β UNIX - Get User ID.globus_result_t globus_gsi_sysconfig_get_username_unix(char **username)β UNIX - Get Username.globus_result_t globus_gsi_sysconfig_get_proc_id_string_unix(char **proc_id_string)β UNIX - Get Process ID.globus_result_t globus_gsi_sysconfig_make_absolute_path_for_filename_unix(char *filename, char **absolute_path)β UNIX - Make Absolute Path.globus_result_t globus_gsi_sysconfig_split_dir_and_filename_unix(char *full_filename, char **dir_string, char **filename_string)β UNIX - Split Directory and Filename.globus_result_t globus_gsi_sysconfig_get_current_working_dir_unix(char **working_dir)β UNIX - Get Current Working Directory.globus_result_t globus_gsi_sysconfig_get_home_dir_unix(char **home_dir)β UNIX - Get HOME Directory. Get the HOME Directory of the current user. Should be the$HOMEenvironment variable. "globus_result_t globus_gsi_sysconfig_file_exists_unix(const char *filename)β UNIX - File Exists.globus_result_t globus_gsi_sysconfig_dir_exists_unix(const char *filename)β UNIX - Directory Exists.globus_result_t globus_gsi_sysconfig_check_keyfile_unix(const char *filename)β UNIX - Check File Status for Key.globus_result_t globus_gsi_sysconfig_check_keyfile_uid_unix(const char *filename, uid_t uid)β UNIX - Check File Status for Key.globus_result_t globus_gsi_sysconfig_check_certfile_unix(const char *filename)β UNIX - Check File Status for Cert.globus_result_t globus_gsi_sysconfig_check_certfile_uid_unix(const char *filename, uid_t uid)β UNIX - Check File Status for Cert.globus_result_t globus_gsi_sysconfig_get_cert_dir_unix(char **cert_dir)β UNIX - Get Trusted CA Cert Dir.globus_result_t globus_gsi_sysconfig_get_user_cert_filename_unix(char **user_cert, char **user_key)β UNIX - Get User Certificate and Key Filenames.globus_result_t globus_gsi_sysconfig_get_host_cert_filename_unix(char **host_cert, char **host_key)β UNIX - Get Host Certificate and Key Filenames.globus_result_t globus_gsi_sysconfig_get_service_cert_filename_unix(char *service_name, char **service_cert, char **service_key)β UNIX - Get Service Certificate and Key Filenames.globus_result_t globus_gsi_sysconfig_get_proxy_filename_unix(char **user_proxy, globus_gsi_proxy_file_type_t proxy_file_type)β UNIX - Get Proxy Filename.globus_result_t globus_gsi_sysconfig_get_signing_policy_filename_unix(X509_NAME *ca_name, char *cert_dir, char **signing_policy_filename)β UNIX - Get Signing Policy Filename.globus_result_t globus_gsi_sysconfig_get_ca_cert_files_unix(char *ca_cert_dir, globus_fifo_t *ca_cert_list)β UNIX - Get CA Cert Filenames.globus_result_t globus_gsi_sysconfig_remove_all_owned_files_unix(char *default_filename)β UNIX - Remove all proxies owned by current uid.globus_result_t globus_gsi_sysconfig_is_superuser_unix(int *is_superuser)β UNIX - Check if the current user is root.globus_result_t globus_gsi_sysconfig_get_gridmap_filename_unix(char **filename)β UNIX - Get the path and file name of the grid map file.globus_result_t globus_gsi_sysconfig_get_authz_conf_filename_unix(char **filename)β UNIX - Get the path of authorization callback configuration.globus_result_t globus_gsi_sysconfig_get_authz_lib_conf_filename_unix(char **filename)β UNIX - Get the path and file name of the authorization callback configuration file.globus_result_t globus_gsi_sysconfig_get_gaa_conf_filename_unix(char **filename)β UNIX - Get the path and file name of the gaa configuration file.
π Detailed Description π
Functions for UNIX platforms.
These functions implement the UNIX version of the Globus GSI System Configuration API. They should never be called directly, please use the provided platform independent defines. fr fr, do not come for these directly, they said what they said. π«Ά
π Function Documentation π
π globus_result_t globus_gsi_sysconfig_check_certfile_uid_unix(const char *filename, uid_t uid)
UNIX - Check File Status for Cert. This is a convenience function used to check the status of a certificate file. The desired status is the current user has ownership and read/write permissions, while group and others only have read permissions.
Parameters
- filename β The name of the file to check the status of
- uid β The user id that may be the owner of the file
Returns
GLOBUS_SUCCESS if the status of the file was able to be determined. Otherwise, an error object identifier
π globus_result_t globus_gsi_sysconfig_check_certfile_unix(const char *filename)
UNIX - Check File Status for Cert. This is a convenience function used to check the status of a certificate file. The desired status is the current user has ownership and read/write permissions, while group and others only have read permissions.
Parameters
- filename β The name of the file to check the status of
Returns
GLOBUS_SUCCESS if the status of the file was able to be determined. Otherwise, an error object identifier
π globus_result_t globus_gsi_sysconfig_check_keyfile_uid_unix(const char *filename, uid_t uid)
UNIX - Check File Status for Key. This is a convenience function used to check the status of a private key file. The desired status is only the specified user has ownership and read permissions, everyone else should not be able to access it.
Parameters
- filename β The name of the file to check the status of
- uid β The owner of the file to check the status of
Returns
GLOBUS_SUCCESS if the status of the file was able to be determined. Otherwise, an error object identifier
π globus_result_t globus_gsi_sysconfig_check_keyfile_unix(const char *filename)
UNIX - Check File Status for Key. This is a convenience function used to check the status of a private key file. The desired status is only the current user has ownership and read permissions, everyone else should not be able to access it.
Parameters
- filename β The name of the file to check the status of
Returns
GLOBUS_SUCCESS if the status of the file was able to be determined. Otherwise, an error object identifier
π globus_result_t globus_gsi_sysconfig_dir_exists_unix(const char * filename)
UNIX - Directory Exists. Check if the directory exists
Parameters
- filename β The filename of the directory to check for
Returns
GLOBUS_SUCCESS if the directory exists, otherwise an error object identifier.
π globus_result_t globus_gsi_sysconfig_file_exists_unix(const char *filename)
UNIX - File Exists. Check if the file exists
Parameters
- filename β The filename of the file to check for
Returns
GLOBUS_SUCCESS if the file exists and is readable, otherwise an error object identifier
π globus_result_t globus_gsi_sysconfig_get_authz_conf_filename_unix(char ** filename)
UNIX - Get the path of authorization callback configuration. Get the path and file name of the authorization callback configuration file
Parameters
- filename β Contains the location of the authorization callback configuration file upon successful return
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
π globus_result_t globus_gsi_sysconfig_get_authz_lib_conf_filename_unix(char ** filename)
UNIX - Get the path and file name of the authorization callback configuration file. Get the path and file name of the authorization callback configuration file
Parameters
- filename β Contains the location of the authorization callback configuration file upon successful return
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
π globus_result_t globus_gsi_sysconfig_get_ca_cert_files_unix(char * ca_cert_dir, globus_fifo_t * ca_cert_list)
UNIX - Get CA Cert Filenames. Gets a list of trusted CA certificate filenames in a trusted CA certificate directory.
Parameters
- ca_cert_dir β The trusted CA certificate directory to get the filenames from
- ca_cert_list β The resulting list of CA certificate filenames. This is a a globus list structure.
See also
globus_fifo_t
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
π globus_result_t globus_gsi_sysconfig_get_cert_dir_unix(char ** cert_dir)
UNIX - Get Trusted CA Cert Dir. Get the Trusted Certificate Directory containing the trusted Certificate Authority certificates. This directory is determined in the order shown below. Failure in one method results in attempting the next.
X509_CERT_DIRenvironment variable - if this is set, the trusted certificates will be searched for in that directory. This variable allows the end user to specify the location of trusted certificates.$HOME/.globus/certificates- If this directory exists, and the previous methods of determining the trusted certs directory failed, this directory will be used./etc/grid-security/certificates- This location is intended to be independent of the globus installation ($GLOBUS_LOCATION), and is generally only writeable by the host system administrator.$GLOBUS_LOCATION/share/certificates
Parameters
- cert_dir β The trusted certificates directory
Returns
GLOBUS_SUCCESS if no error occurred, and a sufficient trusted certificates directory was found. Otherwise, an error object identifier returned.
π globus_result_t globus_gsi_sysconfig_get_current_working_dir_unix(char ** working_dir)
UNIX - Get Current Working Directory. Get the current working directory on the system.
Parameters
- working_dir β The current working directory
Returns
GLOBUS_SUCCESS or an error object identifier
π globus_result_t globus_gsi_sysconfig_get_gaa_conf_filename_unix(char ** filename)
UNIX - Get the path and file name of the gaa configuration file. Get the path and file name of the GAA configuration file
Parameters
- filename β Contains the location of the GAA callback configuration file upon successful return
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
π globus_result_t globus_gsi_sysconfig_get_gridmap_filename_unix(char ** filename)
UNIX - Get the path and file name of the grid map file. Get the path and file name of the grid map file.
Parameters
filenameβ on a successful return, this holds the location of the grid map file π
Returns
GLOBUS_SUCCESS if literally nothing went wrong, otherwise you get an error object ID back π
globus_result_t globus_gsi_sysconfig_get_home_dir_unix (char ** home_dir)
UNIX - Get HOME Directory
Okay so this one grabs the HOME directory of whoever's running it right now. It should be the $HOME environment variable, bestie. π
Parameters
home_dirβ the home directory of the current user
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object is returned. β¨
globus_result_t globus_gsi_sysconfig_get_host_cert_filename_unix (char ** host_cert, char ** host_key)
UNIX - Get Host Certificate and Key Filenames
Gets the host cert and key filenames based on the current user's environment. The host cert and key get searched for in these locations, in order:
- The
X509_USER_CERTandX509_USER_KEYenvironment variables $GLOBUS_LOCATION/etc/host[cert|key].pem$HOME/.globus/host[cert|key].pem
Parameters
host_certβ pointer to the host certificate filenamehost_keyβ pointer to the host key filename
Returns
GLOBUS_SUCCESS if the host cert and key were found, otherwise an error object identifier is returned π«Ά
globus_result_t globus_gsi_sysconfig_get_proc_id_string_unix (char ** proc_id_string)
UNIX - Get Process ID
Gets a unique string representing the current process. And by "unique string" we mean... it's literally just the pid converted to a string. That's it. That's the whole vibe. π
Parameters
proc_id_stringβ a unique string representing the process
Returns
GLOBUS_SUCCESS unless an error occurred
globus_result_t globus_gsi_sysconfig_get_proxy_filename_unix (char ** user_proxy, globus_gsi_proxy_file_type_t proxy_file_type)
UNIX - Get Proxy Filename
Grabs the proxy cert filename based on this search order:
- The
X509_USER_PROXYenvironment variable β this env var gets set at run time for the specific application. Ifproxy_file_typeis set toGLOBUS_PROXY_OUTPUT(meaning you're asking for a proxy filename to write to), andX509_USER_PROXYis set, then that value is what theuser_proxyfilename string you passed in ends up being. But ifproxy_file_typeisGLOBUS_PROXY_INPUTandX509_USER_PROXYis set but the file it points to doesn't exist, or has some other readability issues, the function keeps going and checks the other methods available. π - Check the default location for the proxy file, which is
/tmp/x509_u<user_id>where<user id>is some unique string for that user on the host
Parameters
user_proxyβ the proxy filename of the userproxy_file_typeβ switch for determining whether to return an existing proxy filename, or whether a filename suitable for creating a proxy should be returned
Returns
GLOBUS_SUCCESS or an error object identifier
globus_result_t globus_gsi_sysconfig_get_service_cert_filename_unix (char * service_name, char ** service_cert, char ** service_key)
UNIX - Get Service Certificate and Key Filenames
Gets the Service Certificate Filename based on the current user's environment. The host cert and key get searched for in these locations, again in order:
- The
X509_USER_CERTandX509_USER_KEYenvironment variables /etc/grid-security/{service_name}/{service_name}[cert|key].pemGLOBUS_LOCATION/etc/{service_name}/{service_name}[cert|key].pem
So for example, if my service was named: myservice, the location of the certificate would be:
GLOBUS_LOCATION/etc/myservice/myservicecert.pem
<users home>/.globus/{service_name}/{service_name}[cert|key].pem
Parameters
service_nameβ the name of the service, which is what lets us figure out the locations of the cert and key files to look forservice_certβ pointer to the host certificate filenameservice_keyβ pointer to the host key filename
Returns
GLOBUS_SUCCESS if the service cert and key were found, otherwise an error object identifier
globus_result_t globus_gsi_sysconfig_get_signing_policy_filename_unix (X509_NAME * ca_name, char * cert_dir, char ** signing_policy_filename)
UNIX - Get Signing Policy Filename
Gets the Signing Policy Filename on the current system, based on the CA's subject name plus the trusted certificates directory. π
Parameters
ca_nameβ the X509 subject name of the CA to get the signing policy of. The hash of the CA is generated from thiscert_dirβ the trusted CA certificates directory, containing the signing policy files of the trusted CAssigning_policy_filenameβ the resulting signing policy filename
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID
globus_result_t globus_gsi_sysconfig_get_user_cert_filename_unix (char ** user_cert, char ** user_key)
UNIX - Get User Certificate and Key Filenames
Gets the User Certificate Filename based on the current user's environment. These locations get searched for cert and key files, in order:
- The environment variables
X509_USER_CERTandX509_USER_KEY $HOME/.globus/usercert.pemand$HOME/.globus/userkey.pem$HOME/.globus/usercred.p12β this one is a PKCS12 credential ποΈ
Parameters
user_certβ pointer to the filename of the user certificateuser_keyβ pointer to the filename of the user key
Returns
GLOBUS_SUCCESS if the cert and key files were found in one of the possible locations, otherwise an error object identifier is returned
globus_result_t globus_gsi_sysconfig_get_user_id_string_unix (char ** user_id_string)
UNIX - Get User ID
Gets a unique string representing the current user. And yes, same energy as the process one β it's just the uid converted to a string. π
Parameters
user_id_stringβ a unique string representing the user
Returns
GLOBUS_SUCCESS unless an error occurred
globus_result_t globus_gsi_sysconfig_get_username_unix (char ** username)
UNIX - Get Username
Gets the username of the current user. Simple, iconic, does what it says. π
Parameters
usernameβ on a successful return this parameter will contain the current user name. And heads up bestie, it is the user's responsibility to free the memory allocated for this return value. Don't leave it hanging. π«Ά
Returns
GLOBUS_SUCCESS unless an error occurred
globus_result_t globus_gsi_sysconfig_is_superuser_unix (int * is_superuser)
UNIX - Check if the current user is root
Checks whether the current user is root. The vibe check for superuser energy. π
Parameters
is_superuserβ1if the user is the superuser,0if not
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
globus_result_t globus_gsi_sysconfig_make_absolute_path_for_filename_unix (char * filename, char ** absolute_path)
UNIX - Make Absolute Path
Turns the filename into an absolute path string, based on the current working directory. π
Parameters
filenameβ the filename to get the absolute path ofabsolute_pathβ the resulting absolute path. This needs to be freed when no longer needed.
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
globus_result_t globus_gsi_sysconfig_remove_all_owned_files_unix (char * default_filename)
UNIX - Remove all proxies owned by current uid
Removes all the proxies (aka every delegated and grid-proxy-init generated proxy) found in the secure tmp directory that are owned by the current user. Cleanup era. π§Ή
Parameters
default_filenameβ the filename of the default proxy
Returns
GLOBUS_SUCCESS if no error occurred, otherwise an error object ID is returned
globus_result_t globus_gsi_sysconfig_set_key_permissions_unix (char * filename)
UNIX - Set Key Permissions
Sets the file permissions of a file to read-write only by the user β which are the permissions that should be set for all private keys. Keep those keys locked down, fr fr. π
Parameters
filename
Returns
GLOBUS_SUCCESS or an error object id
globus_result_t globus_gsi_sysconfig_split_dir_and_filename_unix (char * full_filename, char ** dir_string, char ** filename_string)
UNIX - Split Directory and Filename
Splits the directory and filename portions of a filename string into two separate strings. Two-for-one special. βοΈ
Parameters
full_filenameβ the filename to split. It splits on the last occurrence of/, where the directory is everything before the last/, and the filename is everything after.dir_stringβ the directory portion of the filename string. If no/is found anywhere in the string, this variable points toNULL. This needs to be freed when no longer needed.filename_stringβ the filename portion of the filename string. If no/is found anywhere, this variable is a duplicate of thefull_filenameparameter. This needs to be freed when no longer needed.
Returns
GLOBUS_SUCCESS if no error occurred. Otherwise an error object ID is returned.
πΈ Author πΈ
Generated automatically by Doxygen for globus_gsi_sysconfig from the source code. π€ (yes, the docs wrote themselves, we love an independent queen)
and that's a wrap on the whole page, bestie!! πβ¨ the footer stamps this one as globus_gsi_sysconfig, Version 9.6, from the source code β go forth and slay your certs, mwah ππ
π¦
π¦ where this page comes from
- epel 10: globus-gsi-sysconfig-doc 9.6-1.el10_0 Β· Apache-2.0
- fedora 43: globus-gsi-sysconfig-doc 9.6-4.fc43 Β· Apache-2.0
- fedora 44: globus-gsi-sysconfig-doc 9.6-5.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-gsi-sysconfig-doc 9.6-2build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms