Modify

Opened 12 years ago

Closed 12 years ago

Last modified 6 years ago

#189 closed enhancement (fixed)

Only launch telnetd if in failsafe or no root password

Reported by: Stereo Owned by: developers
Priority: low Milestone: 1.0-rc5
Component: base system Version: 1.0
Keywords: telnet Cc: openwrt-trac@…

Description

The idea is Wallace78's. Awk exits with 1 if /etc/passwd doesn't contain a root password or can't be read. If that is the case, or if $FAISAFE is true, the telnetd is launched.

--- openwrt/package/base-files/default/etc/init.d/S50telnet	(revision 2861)
+++ openwrt/package/base-files/default/etc/init.d/S50telnet	(working copy)
@@ -1,2 +1,2 @@
#!/bin/sh
- telnetd -l /bin/login
+ if awk -F: '/^root:/ && $2 !~ /\*/ {exit 1}' /etc/passwd 2>/dev/null || test $FAILSAFE; then telnetd -l /bin/login; fi

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Merged in r2863, thanks !

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.