[TinyLogin] Tinylogin passwd doesn't like symlinks

Carl G Lewis clewis at westel.com.au
Tue May 11 01:08:35 MDT 2004


Hi, 

In the embedded system I am working on, the passwd and group files are stored 
on a JFFS2 filesystem which is mounted under /mnt. The root fs (which includes 
/etc) is a ramdisk. During the boot process I create symlinks from /etc/ to 
the two files on the flash filesystem. 

This works to some extent, except when using passwd. The problem is the use of  
rename(2) in update_passwd(). Basically when you try to rename the symlink,  
it is overwritten and you endup with an ordinary file on the ramdisk.

I have altered the implementation to use copyfd() from libbb, so everything is  
peachy. I just have a couple of q's:

1. Is using symlinks for /etc/passwd and /etc/group in this way bad/insecure 
for some reason I haven't thought of?

2. Do you want a patch so that tinylogin passwd works in this situation?

Thanks, 

Carl.



More information about the tinylogin mailing list