Beispiel #1
0
INT64_T chirp_global_getacl(const char *host, const char *path, chirp_dir_t callback, void *arg, time_t stoptime)
{
	if(is_multi_path(host)) {
		char mhost[CHIRP_PATH_MAX];
		char mpath[CHIRP_PATH_MAX];
		parse_multi_path(path, mhost, mpath);
		return chirp_multi_getacl(mhost, mpath, callback, arg, stoptime);
	} else if(not_empty(path)) {
		return chirp_reli_getacl(host, path, callback, arg, stoptime);
	} else if(not_empty(host)) {
		return chirp_reli_getacl(host, "/", callback, arg, stoptime);
	} else {
		errno = EINVAL;
		return -1;
	}
}
Beispiel #2
0
INT64_T chirp_multi_getacl(const char *volume, const char *path, chirp_dir_t callback, void *arg, time_t stoptime)
{
	char lpath[CHIRP_PATH_MAX];
	if(!chirp_multi_lpath(volume, path, lpath, stoptime))
		return -1;
	return chirp_reli_getacl(current_volume->host, lpath, callback, arg, stoptime);
}
Beispiel #3
0
static INT64_T do_getacl(int argc, char **argv)
{
	char full_path[CHIRP_PATH_MAX];

	if(!argv[1])
		argv[1] = ".";
	complete_remote_path(argv[1], full_path);

	return chirp_reli_getacl(current_host, full_path, print_one_acl, stdout, stoptime);
}