Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162880
b: refs/heads/master
c: 8b81547
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and David S. Miller committed Sep 15, 2009
1 parent 67c690d commit 43f957a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 531afd64d027e3d798c416b2b37b3cfb1de417d9
refs/heads/master: 8b815477f382f96deefbe5bd4404fa7b31cf5dcf
7 changes: 7 additions & 0 deletions trunk/include/linux/rxrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,12 @@ struct sockaddr_rxrpc {
#define RXRPC_SECURITY_AUTH 1 /* authenticated packets */
#define RXRPC_SECURITY_ENCRYPT 2 /* encrypted packets */

/*
* RxRPC security indices
*/
#define RXRPC_SECURITY_NONE 0 /* no security protocol */
#define RXRPC_SECURITY_RXKAD 2 /* kaserver or kerberos 4 */
#define RXRPC_SECURITY_RXGK 4 /* gssapi-based */
#define RXRPC_SECURITY_RXK5 5 /* kerberos 5 */

#endif /* _LINUX_RXRPC_H */
4 changes: 2 additions & 2 deletions trunk/net/rxrpc/ar-key.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static int rxrpc_instantiate(struct key *key, const void *data, size_t datalen)
tsec->ticket[6], tsec->ticket[7]);

ret = -EPROTONOSUPPORT;
if (tsec->security_index != 2)
if (tsec->security_index != RXRPC_SECURITY_RXKAD)
goto error;

key->type_data.x[0] = tsec->security_index;
Expand Down Expand Up @@ -308,7 +308,7 @@ int rxrpc_get_server_data_key(struct rxrpc_connection *conn,
_debug("key %d", key_serial(key));

data.kver = 1;
data.tsec.security_index = 2;
data.tsec.security_index = RXRPC_SECURITY_RXKAD;
data.tsec.ticket_len = 0;
data.tsec.expiry = expiry;
data.tsec.kvno = 0;
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/rxrpc/rxkad.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct rxkad_level2_hdr {
__be32 checksum; /* decrypted data checksum */
};

MODULE_DESCRIPTION("RxRPC network protocol type-2 security (Kerberos)");
MODULE_DESCRIPTION("RxRPC network protocol type-2 security (Kerberos 4)");
MODULE_AUTHOR("Red Hat, Inc.");
MODULE_LICENSE("GPL");

Expand Down Expand Up @@ -506,7 +506,7 @@ static int rxkad_verify_packet(const struct rxrpc_call *call,
if (!call->conn->cipher)
return 0;

if (sp->hdr.securityIndex != 2) {
if (sp->hdr.securityIndex != RXRPC_SECURITY_RXKAD) {
*_abort_code = RXKADINCONSISTENCY;
_leave(" = -EPROTO [not rxkad]");
return -EPROTO;
Expand Down Expand Up @@ -1122,7 +1122,7 @@ static void rxkad_clear(struct rxrpc_connection *conn)
static struct rxrpc_security rxkad = {
.owner = THIS_MODULE,
.name = "rxkad",
.security_index = RXKAD_VERSION,
.security_index = RXRPC_SECURITY_RXKAD,
.init_connection_security = rxkad_init_connection_security,
.prime_packet_security = rxkad_prime_packet_security,
.secure_packet = rxkad_secure_packet,
Expand Down

0 comments on commit 43f957a

Please sign in to comment.