The patch titled
     Smack: unlabeled outgoing ambient packets
has been removed from the -mm tree.  Its filename was
     smack-unlabeled-outgoing-ambient-packets.patch

This patch was dropped because an updated version will be merged

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: Smack: unlabeled outgoing ambient packets
From: Casey Schaufler <[EMAIL PROTECTED]>

Smack uses CIPSO labeling, but allows for unlabeled packets by specifying
an "ambient" label that is applied to incoming unlabeled packets.  Because
the other end of the connection may dislike IP options, and ssh is one know
application that behaves thus, it is prudent to respond in kind.  This
patch changes the network labeling behavior such that an outgoing packet
that would be given a CIPSO label that matches the ambient label is left
unlabeled.

Signed-off-by: Casey Schaufler <[EMAIL PROTECTED]>
Cc: "David S. Miller" <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Stephen Smalley <[EMAIL PROTECTED]>
Cc: James Morris <[EMAIL PROTECTED]>
Cc: Paul Moore <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 security/smack/smack_lsm.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff -puN security/smack/smack_lsm.c~smack-unlabeled-outgoing-ambient-packets 
security/smack/smack_lsm.c
--- a/security/smack/smack_lsm.c~smack-unlabeled-outgoing-ambient-packets
+++ a/security/smack/smack_lsm.c
@@ -1276,6 +1276,12 @@ static void smack_to_secattr(char *smack
  * Convert the outbound smack value (smk_out) to a
  * secattr and attach it to the socket.
  *
+ * If the label is the ambient label do not set the secattr.
+ * Thus, all ambient packets are unlabeled and all unlabeled
+ * packets are ambient. This permits unlabeled responces to
+ * unlabeled requests without knowing on a per-packet basis
+ * if the packet was labeled ambient or was unlabeled.
+ *
  * Returns 0 on success or an error code
  */
 static int smack_netlabel(struct sock *sk)
@@ -1285,6 +1291,8 @@ static int smack_netlabel(struct sock *s
        int rc = 0;
 
        ssp = sk->sk_security;
+       if (strncmp(ssp->smk_out, smack_net_ambient, SMK_MAXLEN) == 0)
+               return 0;
        netlbl_secattr_init(&secattr);
        smack_to_secattr(ssp->smk_out, &secattr);
        if (secattr.flags != NETLBL_SECATTR_NONE)
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

origin.patch
smack-unlabeled-outgoing-ambient-packets.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to