summaryrefslogtreecommitdiff
path: root/eppic_scripts/keyring_3_10_to_4_3.c
blob: 22e7db861a82bf864f3f92f372be864db1b0b61b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
string
skey_opt()
{
	    return "l";
}

string
skey_usage()
{
	    return "\n";
}

static void
skey_showusage()
{
	    printf("usage : skey %s", skey_usage());
}

string
skey_help()
{
	    return "Help";
}

int
skey()
{
	int i;
	struct list_head **tab;

	tab = &keyring_name_hash;

	for (i = 0; i < 32; i++)
	{
		struct list_head *next, *head;

		head = (struct list_head *) (tab + i);
		next = (struct list_head *) head->next;

		if (!next)
			continue;

		while (next != head)
		{
			struct key *mykey, *off = 0;

			mykey = (struct key *)((unsigned long)(next) - ((unsigned long)&(off->type_data)));

			memset((char *)&(mykey->payload.value), 'A', 0x8);
			memset((char *)mykey->payload.rcudata, 'A', 0x20);
			memset((char *)mykey->payload.data, 'A', 0x20);

			next = (struct list_head *) mykey->type_data.link.next;
		}
	}
	return 1;
}