Skip to content
Snippets Groups Projects
Select Git revision
  • 2bc180f202d964d22e702cc71e9bae9796358792
  • master default protected
  • rednatco-v2
  • base-pairs-ladder
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

cif-schemas.md

Blame
  • zs3-keyctl-order.older 1.51 KiB
    Index: nfs-utils-1.2.8/utils/nfsidmap/nfsidmap.c
    ===================================================================
    --- nfs-utils-1.2.8.orig/utils/nfsidmap/nfsidmap.c
    +++ nfs-utils-1.2.8/utils/nfsidmap/nfsidmap.c
    @@ -33,6 +33,8 @@ char *usage="Usage: %s [-v] [-c || [-u|-
     
     static int keyring_clear(char *keyring);
     
    +int timeout = 600;
    +
     #define UIDKEYS 0x1
     #define GIDKEYS 0x2
     
    @@ -58,6 +60,9 @@ int id_lookup(char *name_at_domain, key_
     			(type == USER ? "nfs4_owner_to_uid" : "nfs4_group_owner_to_gid"));
     
     	if (rc == 0) {
    +		/* Set timeout to 10 (600 seconds) minutes */
    +		keyctl_set_timeout(key, timeout);
    +
     		rc = keyctl_instantiate(key, id, strlen(id) + 1, 0);
     		if (rc < 0) {
     			switch(rc) {
    @@ -112,6 +117,9 @@ int name_lookup(char *id, key_serial_t k
     			(type == USER ? "nfs4_uid_to_name" : "nfs4_gid_to_name"));
     
     	if (rc == 0) {
    +		/* Set timeout to 10 (600 seconds) minutes */
    +		keyctl_set_timeout(key, timeout);
    +
     		rc = keyctl_instantiate(key, &name, strlen(name), 0);
     		if (rc < 0)
     			xlog_err("name_lookup: keyctl_instantiate failed: %m");
    @@ -230,7 +238,6 @@ int main(int argc, char **argv)
     	char *value;
     	char *type;
     	int rc = 1, opt;
    -	int timeout = 600;
     	key_serial_t key;
     	char *progname, *keystr = NULL;
     	int clearing = 0, keymask = 0;
    @@ -323,10 +330,6 @@ int main(int argc, char **argv)
     	else if (strcmp(type, "group") == 0)
     		rc = name_lookup(value, key, GROUP);
     
    -	/* Set timeout to 10 (600 seconds) minutes */
    -	if (rc == 0)
    -		keyctl_set_timeout(key, timeout);
    -
     	free(arg);
     	return rc;
     }