diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /fs/ncpfs/sock.c | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'fs/ncpfs/sock.c')
-rw-r--r-- | fs/ncpfs/sock.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index cc8326c05..ea15ae968 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c @@ -8,6 +8,8 @@ * */ +#include <linux/config.h> + #include <linux/sched.h> #include <linux/errno.h> #include <linux/socket.h> @@ -18,15 +20,21 @@ #include <linux/net.h> #include <linux/mm.h> #include <linux/netdevice.h> +#include <linux/signal.h> #include <net/scm.h> #include <net/sock.h> #include <linux/ipx.h> #include <linux/poll.h> +#include <linux/file.h> #include <linux/ncp.h> #include <linux/ncp_fs.h> #include <linux/ncp_fs_sb.h> +#ifdef CONFIG_NCPFS_PACKET_SIGNING +#include "ncpsign_kernel.h" +#endif + static int _recv(struct socket *sock, unsigned char *ubuf, int size, unsigned flags) { @@ -124,12 +132,12 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size) What if we've blocked it ourselves? What about alarms? Why, in fact, are we mucking with the sigmask at all? -- r~ */ - if (current->sig->action[SIGINT - 1].sa_handler == SIG_DFL) + if (current->sig->action[SIGINT - 1].sa.sa_handler == SIG_DFL) mask |= sigmask(SIGINT); - if (current->sig->action[SIGQUIT - 1].sa_handler == SIG_DFL) + if (current->sig->action[SIGQUIT - 1].sa.sa_handler == SIG_DFL) mask |= sigmask(SIGQUIT); } - siginitmaskinv(¤t->blocked, mask); + siginitsetinv(¤t->blocked, mask); recalc_sigpending(current); spin_unlock_irqrestore(¤t->sigmask_lock, flags); @@ -177,6 +185,7 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size) current->timeout = jiffies + timeout; schedule(); remove_wait_queue(entry.wait_address, &entry.wait); + fput(file); current->state = TASK_RUNNING; if (signal_pending(current)) { current->timeout = 0; @@ -201,8 +210,10 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size) continue; } else current->timeout = 0; - } else if (wait_table.nr) + } else if (wait_table.nr) { remove_wait_queue(entry.wait_address, &entry.wait); + fput(file); + } current->state = TASK_RUNNING; /* Get the header from the next packet using a peek, so keep it @@ -278,7 +289,7 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size) } spin_lock_irqsave(¤t->sigmask_lock, flags); - current->blocked = old_mask; + current->blocked = old_set; recalc_sigpending(current); spin_unlock_irqrestore(¤t->sigmask_lock, flags); @@ -301,6 +312,12 @@ static int ncp_do_request(struct ncp_server *server, int size) if (!ncp_conn_valid(server)) { return -EIO; } +#ifdef CONFIG_NCPFS_PACKET_SIGNING + if (server->sign_active) + { + sign_packet(server, &size); + } +#endif /* CONFIG_NCPFS_PACKET_SIGNING */ result = do_ncp_rpc_call(server, size); DDPRINTK(KERN_DEBUG "do_ncp_rpc_call returned %d\n", result); |