Re: [PATCH 5/8] hook(clone protections): add escape hatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
writes:

> +static int is_hook_safe_during_clone(const char *name, const char *path, char *sha256)
> +{
> +	if (get_sha256_of_file_contents(path, sha256) < 0)
> +		return 0;
> +
> +	if (!safe_hook_sha256s_initialized) {
> +		safe_hook_sha256s_initialized = 1;
> +		git_protected_config(safe_hook_cb, &safe_hook_sha256s);
> +	}
> +
> +	return strset_contains(&safe_hook_sha256s, sha256);
> +}

Makes sense.  Use of a hashmap/strset here makes sense.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux