[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[mtools] floppyd: authentication failed device locked
From: |
Mahesh M. |
Subject: |
[mtools] floppyd: authentication failed device locked |
Date: |
Wed, 22 Dec 2004 23:05:27 -0800 (PST) |
Hello,
I am using floppyd for terminal servers (LTSP). After
using any defective floppy the floppyd daemon does not
clear the lock file and refuses further use of
floppies on the terminal:
Authentication failed, device locked.
After surfing the net i found that this is a common
problem faced many LTSP users.
I used the patch mtools-3.9.9-20030718.diff.gz but
this too fails when using commands like mdir on a
defective floppy.
The problem is that the lock is not cleaned up after
access of a defective floppy.
Solution: I got a temporary solution to the problem:
why not just ignore the lock.
Note: i am not sure how it will affect floppyd. But it
works for me. I also used the patch
mtools-3.9.9-20030718.diff.gz along with this. Any
comments are welcome.
The following are the modifications to floppyd.c
--- ../mtools-3.9.9/floppyd.c 2002-11-02
16:25:24.000000000 +0530
+++ floppyd.c 2004-12-23 11:33:40.000000000 +0530
@@ -446,14 +446,15 @@
fd = open(XauFileName(), O_WRONLY | O_CREAT |
O_EXCL, 0600);
/* Locked! */
- if (fd == -1) {
+ /* MM 2004/12/23 Commenting out the following
ignores the lock */
+ /*if (fd == -1) {
put_dword(reply, 0, AUTH_DEVLOCKED);
send_packet(reply, sock);
close(fd);
destroyPacket(reply);
destroyPacket(mit_cookie);
return 0;
- }
+ }*/
ptr = template;
ptr[4095] = 0;
The following are the modifications to floppyd_io.c
(perhaps this is not required?)
--- ../mtools-3.9.9/floppyd_io.c 2002-05-01
16:18:11.000000000 +0530
+++ floppyd_io.c 2004-12-23 11:42:23.000000000
+0530
@@ -113,8 +113,10 @@
xcookie = (char *) safe_malloc(filelen+4);
filelen = safePopenOut(command, xcookie+4,
filelen);
- if(filelen < 1)
- return AUTH_AUTHFAILED;
+
+ /*MM 2004/12/23 Perhaps commenting this will
ignore the lock ???*/
+ /*if(filelen < 1)
+ return AUTH_AUTHFAILED;*/
/* Version negotiation */
dword2byte(4,buf);
The best solution is to cleanup the lock on access of
any floppy defective or otherwise. I am not sure how
that can be done.
regards,
MM
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
_______________________________________________
mtools mailing list
address@hidden
http://www.tux.org/mailman/listinfo/mtools
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [mtools] floppyd: authentication failed device locked,
Mahesh M. <=