diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-23 20:15:10 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-23 20:15:10 +0100 |
commit | 0221cc4264b0516f055efcdd2455ba880b53aa8c (patch) | |
tree | c3cfc3286d6cc34d4ed2fb00abbc0ca2f9383022 /package/open-iscsi/patches/patch-usr_mgmt_ipc_c | |
parent | 9c9d5cb90a86edf1e9dc240bf0f38572f2ab26d6 (diff) | |
parent | 937473821b259ed94969e62daa2ec60f5f2a9ffc (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/open-iscsi/patches/patch-usr_mgmt_ipc_c')
-rw-r--r-- | package/open-iscsi/patches/patch-usr_mgmt_ipc_c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/package/open-iscsi/patches/patch-usr_mgmt_ipc_c b/package/open-iscsi/patches/patch-usr_mgmt_ipc_c new file mode 100644 index 000000000..bc29bd21b --- /dev/null +++ b/package/open-iscsi/patches/patch-usr_mgmt_ipc_c @@ -0,0 +1,35 @@ +--- open-iscsi-2.0-871.orig/usr/mgmt_ipc.c 2009-07-11 05:55:58.000000000 +0200 ++++ open-iscsi-2.0-871/usr/mgmt_ipc.c 2010-11-22 22:47:25.000000000 +0100 +@@ -341,31 +341,7 @@ mgmt_ipc_notify_del_portal(queue_task_t + static int + mgmt_peeruser(int sock, char *user) + { +-#if defined(SO_PEERCRED) +- /* Linux style: use getsockopt(SO_PEERCRED) */ +- struct ucred peercred; +- socklen_t so_len = sizeof(peercred); +- struct passwd *pass; +- +- errno = 0; +- if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, +- &so_len) != 0 || so_len != sizeof(peercred)) { +- /* We didn't get a valid credentials struct. */ +- log_error("peeruser_unux: error receiving credentials: %m"); +- return 0; +- } +- +- pass = getpwuid(peercred.uid); +- if (pass == NULL) { +- log_error("peeruser_unix: unknown local user with uid %d", +- (int) peercred.uid); +- return 0; +- } +- +- strlcpy(user, pass->pw_name, PEERUSER_MAX); +- return 1; +- +-#elif defined(SCM_CREDS) ++#if defined(SCM_CREDS) + struct msghdr msg; + typedef struct cmsgcred Cred; + #define cruid cmcred_uid |