Skip to contentSkip to conversation

rcmd.3: Add missing condition concerning .rhosts file

PATCH In review Nikola Forró 2 participants 5 messages Jan 4, 2016 – Jan 17, 2016 3 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcmd.3: Add missing condition concerning .rhosts file

The list of conditions determining if iruserok() and ruserok() functions automatically fail is incomplete. According to glibc source code, the functions also fail if the .rhosts file is hardlinked anywhere.

---
 man3/rcmd.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man3/rcmd.3 +2 -2
index 33eae3c..f32fe52 100644
@@ -200,8 +200,8 @@ in the local user's home directory is checked to see if the request for
 service is allowed.
 .PP
 If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the superuser, or is writable by anyone other
-than the owner, the check automatically fails.
+other than the user or the superuser, is writable by anyone other
+than the owner, or is hardlinked anywhere, the check automatically fails.
 Zero is returned if the machine name is listed in the
 .IR hosts.equiv
 file, or the host and remote username are found in the
Signature · 7 lines
2.4.3


--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Nikola,

Quoted 4 lines · Nikola Forró

The list of conditions determining if iruserok() and ruserok() functions automatically fail is incomplete. According to glibc source code, the functions also fail if the .rhosts file is hardlinked anywhere.

Just to better document the patch, could you point to the relevant location in the glibc source code?

Thanks,

Michael

Quoted 20 lines
---
 man3/rcmd.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man3/rcmd.3 +2 -2
index 33eae3c..f32fe52 100644
@@ -200,8 +200,8 @@ in the local user's home directory is checked to see if the request for
 service is allowed.
 .PP
 If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the superuser, or is writable by anyone other
-than the owner, the check automatically fails.
+other than the user or the superuser, is writable by anyone other
+than the owner, or is hardlinked anywhere, the check automatically fails.
 Zero is returned if the machine name is listed in the
 .IR hosts.equiv
 file, or the host and remote username are found in the
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 3 lines · Michael Kerrisk (man-pages)

Just to better document the patch, could you point to the relevant location in the glibc source code?

Sure. It's iruserfopen function in inet/rcmd.c [1].

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=inet/rcmd.c;hb=HEA
D#l465
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
In reply to a message not in the archive
Quoted 4 lines · Nikola Forró

The list of conditions determining if iruserok() and ruserok() functions automatically fail is incomplete. According to glibc source code, the functions also fail if the .rhosts file is hardlinked anywhere.

Thanks, Nikola. Applied.

Cheers,

Michael

Quoted 20 lines
---
 man3/rcmd.3 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man3/rcmd.3 +2 -2
index 33eae3c..f32fe52 100644
@@ -200,8 +200,8 @@ in the local user's home directory is checked to see if the request for
 service is allowed.
 .PP
 If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the superuser, or is writable by anyone other
-than the owner, the check automatically fails.
+other than the user or the superuser, is writable by anyone other
+than the owner, or is hardlinked anywhere, the check automatically fails.
 Zero is returned if the machine name is listed in the
 .IR hosts.equiv
 file, or the host and remote username are found in the
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html