Re: [PATCH] nfsidmap: Enumerate kernel cache of ID mapping results

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

 



Chuck Lever <chuck.lever@xxxxxxxxxx> wrote:

> +	if ((fp = fopen(PROCKEYS, "r")) == NULL) {
> +		xlog_err("fopen(%s) failed: %m", PROCKEYS);
> +		return 1;
> +	}
> +
> +	rc = 1;
> +	while(fgets(buf, BUFSIZ, fp) != NULL) {
> +		unsigned int id;
> +
> +		if (strstr(buf, "keyring") == NULL)
> +			continue;
> +		if (strstr(buf, keyring) == NULL)
> +			continue;
> +		if (sscanf(buf, "%x %*s", &id) != 1)
> +			continue;
> +
> +		list_keys(keyring, (key_serial_t)id);
> +		rc = 0;
> +		break;
> +	}
> +

Did you want find_key_by_type_and_desc() in libkeyutils?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux