NFS: Use the same nfs_client_id4 for every server
[firefly-linux-kernel-4.4.55.git] / include / net / scm.h
index 079d7887dac13697d0dfc5d0cc6ce256800151d0..7dc0854f0b3891992696002b7f75edf7a01233ab 100644 (file)
@@ -70,9 +70,11 @@ static __inline__ void scm_destroy(struct scm_cookie *scm)
 }
 
 static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
-                              struct scm_cookie *scm)
+                              struct scm_cookie *scm, bool forcecreds)
 {
        memset(scm, 0, sizeof(*scm));
+       if (forcecreds)
+               scm_set_cred(scm, task_tgid(current), current_cred());
        unix_get_peersec_dgram(sock, scm);
        if (msg->msg_controllen <= 0)
                return 0;