diff options
author | Damien Miller <djm@mindrot.org> | 2001-12-21 14:45:46 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-12-21 14:45:46 +1100 |
commit | 9f0f5c64bc4b6144e3fed6a7f538f7c21819a492 (patch) | |
tree | f79317ab211f59181a61b526f566e9c8cfe70c73 /sftp-glob.c | |
parent | 89681214ca2f50a1b1ed6164c3afe1ce14995ffc (diff) |
- deraadt@cvs.openbsd.org 2001/12/19 07:18:56
[auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h]
[auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c]
[cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c]
[match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c]
[servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c]
[sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c]
[sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config]
[ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c]
basic KNF done while i was looking for something else
Diffstat (limited to 'sftp-glob.c')
-rw-r--r-- | sftp-glob.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sftp-glob.c b/sftp-glob.c index a432bdfc2..849ac65ed 100644 --- a/sftp-glob.c +++ b/sftp-glob.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sftp-glob.c,v 1.8 2001/07/14 15:10:17 stevesk Exp $"); | 26 | RCSID("$OpenBSD: sftp-glob.c,v 1.9 2001/12/19 07:18:56 deraadt Exp $"); |
27 | 27 | ||
28 | #include "buffer.h" | 28 | #include "buffer.h" |
29 | #include "bufaux.h" | 29 | #include "bufaux.h" |
@@ -49,9 +49,9 @@ static void * | |||
49 | fudge_opendir(const char *path) | 49 | fudge_opendir(const char *path) |
50 | { | 50 | { |
51 | struct SFTP_OPENDIR *r; | 51 | struct SFTP_OPENDIR *r; |
52 | 52 | ||
53 | r = xmalloc(sizeof(*r)); | 53 | r = xmalloc(sizeof(*r)); |
54 | 54 | ||
55 | if (do_readdir(cur.fd_in, cur.fd_out, (char*)path, &r->dir)) | 55 | if (do_readdir(cur.fd_in, cur.fd_out, (char*)path, &r->dir)) |
56 | return(NULL); | 56 | return(NULL); |
57 | 57 | ||
@@ -110,7 +110,7 @@ static void | |||
110 | attrib_to_stat(Attrib *a, struct stat *st) | 110 | attrib_to_stat(Attrib *a, struct stat *st) |
111 | { | 111 | { |
112 | memset(st, 0, sizeof(*st)); | 112 | memset(st, 0, sizeof(*st)); |
113 | 113 | ||
114 | if (a->flags & SSH2_FILEXFER_ATTR_SIZE) | 114 | if (a->flags & SSH2_FILEXFER_ATTR_SIZE) |
115 | st->st_size = a->size; | 115 | st->st_size = a->size; |
116 | if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { | 116 | if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { |
@@ -129,12 +129,12 @@ static int | |||
129 | fudge_lstat(const char *path, struct stat *st) | 129 | fudge_lstat(const char *path, struct stat *st) |
130 | { | 130 | { |
131 | Attrib *a; | 131 | Attrib *a; |
132 | 132 | ||
133 | if (!(a = do_lstat(cur.fd_in, cur.fd_out, (char*)path, 0))) | 133 | if (!(a = do_lstat(cur.fd_in, cur.fd_out, (char*)path, 0))) |
134 | return(-1); | 134 | return(-1); |
135 | 135 | ||
136 | attrib_to_stat(a, st); | 136 | attrib_to_stat(a, st); |
137 | 137 | ||
138 | return(0); | 138 | return(0); |
139 | } | 139 | } |
140 | 140 | ||
@@ -142,12 +142,12 @@ static int | |||
142 | fudge_stat(const char *path, struct stat *st) | 142 | fudge_stat(const char *path, struct stat *st) |
143 | { | 143 | { |
144 | Attrib *a; | 144 | Attrib *a; |
145 | 145 | ||
146 | if (!(a = do_stat(cur.fd_in, cur.fd_out, (char*)path, 0))) | 146 | if (!(a = do_stat(cur.fd_in, cur.fd_out, (char*)path, 0))) |
147 | return(-1); | 147 | return(-1); |
148 | 148 | ||
149 | attrib_to_stat(a, st); | 149 | attrib_to_stat(a, st); |
150 | 150 | ||
151 | return(0); | 151 | return(0); |
152 | } | 152 | } |
153 | 153 | ||
@@ -160,7 +160,7 @@ remote_glob(int fd_in, int fd_out, const char *pattern, int flags, | |||
160 | pglob->gl_closedir = (void (*)(void *))fudge_closedir; | 160 | pglob->gl_closedir = (void (*)(void *))fudge_closedir; |
161 | pglob->gl_lstat = fudge_lstat; | 161 | pglob->gl_lstat = fudge_lstat; |
162 | pglob->gl_stat = fudge_stat; | 162 | pglob->gl_stat = fudge_stat; |
163 | 163 | ||
164 | memset(&cur, 0, sizeof(cur)); | 164 | memset(&cur, 0, sizeof(cur)); |
165 | cur.fd_in = fd_in; | 165 | cur.fd_in = fd_in; |
166 | cur.fd_out = fd_out; | 166 | cur.fd_out = fd_out; |