Hi,

in the last few days I encountered a problem on my SLES 11.1 Linux
with the open-iscsi package in version 2.0-871 respectively 0.872. I
investigated the problem and found out that in my system there are two
root users with uid = 0 (sadly, this is required). Therefore I digged
deeper and found out that the problem most probably lies in the two
code snippets where "root" is defnied explicitely. Those are usr/
mgmt_ipc.c around line 549 with:

if (!mgmt_peeruser(fd, user) || strncmp(user, "root", PEERUSER_MAX)) {
        err = MGMT_IPC_ERR_ACCESS;
        goto err;
}

as well as usr/statics.c around line 7:

static struct passwd root_pw = {
        .pw_name = "root",
}

When the Linux command `whoami` returns something different than
"root", open-iscsi will not work.

As far as I understand the issue, the function call to mgmt_peeruser()
in mgmt_ipc.c sets the variable user to the currently logged in user
name and then it is compared to "root". If my root-user is named
differently, the strncmp function fails of course. I did not
investigate the code in statics.c further, whether it plays a role or
not, since a change to mgmt_ipc.c solves my problem.

Is there a chance to fix this issue just by checking if the user has
sufficient rights, e.g. has uid=0, or is there any special reason for
demanding a user named root?

Thanks a lot
Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to