home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.minix
- Path: sparky!uunet!sun-barr!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.belwue.de!news.uni-tuebingen.de!wega!flebbe
- From: flebbe@wega.tat.physik.uni-tuebingen.de (Olaf Flebbe)
- Subject: Bug in fs Minix1.6.23
- Message-ID: <flebbe.722116609@wega>
- Sender: news@softserv.zdv.uni-tuebingen.de (News Operator)
- Organization: TAT (Theoretical Astrophysics Tuebingen), U. of Tuebingen, FRG
- Date: Wed, 18 Nov 1992 19:56:49 GMT
- Lines: 33
-
- Hi,
-
- I discovered a bug in the 1.6.23 fs, while using test21. Here a quote
- from source of do_rename() in fs/link.c
-
- do_rename() {
- [...]
- struct inode *old_dirp, *old_ip; /* ptrs to old dir, file inodes */
- [ ...]
- if ( (old_ip = advance(old_dirp, old_name)) == NIL_INODE) r = err_code;
- [ ... (no return statements) ...]
- odir = ((old_ip->i_mode & I_TYPE) == I_DIRECTORY); /* TRUE iff dir */
-
- The source describes how to get a pointer to the inode of file
- old_name and how to test, whether it is a directory. But suppose
- advance fails, then advance will return a NIL_INODE, which fs tries to
- derefence. ->Crash.
-
- This will happen, when the old_name is located in a directory with no
- read permissions, because advance uses the function search_dir in
- order to determine the inode #. The comments in search_dir state that
- this function checks the permissions unless the filename is "." or "..".
-
- I'm too lazy to decide which of the described features is a bug, but
- a fs crash is definitly a bug.
-
- Is there already a "official" patch around?
-
- greetings
- olaf
- --
- Olaf Flebbe, Theoretische Astrophysik Tuebingen
- Internet: flebbe@tat.physik.uni-tuebingen.de
-