/*\r
- * uxsftp.c: the Unix-specific parts of PSFTP.\r
+ * uxsftp.c: the Unix-specific parts of PSFTP and PSCP.\r
*/\r
\r
#include <sys/time.h>\r
#include <sys/types.h>\r
#include <unistd.h>\r
#include <errno.h>\r
-#include <pwd.h>\r
\r
#include "putty.h"\r
#include "psftp.h"\r
*/\r
char *platform_default_s(const char *name)\r
{\r
- if (!strcmp(name, "UserName")) {\r
- /*\r
- * Remote login username will default to the local username.\r
- */\r
- struct passwd *p;\r
- uid_t uid = getuid();\r
- char *user, *ret = NULL;\r
-\r
- /*\r
- * First, find who we think we are using getlogin. If this\r
- * agrees with our uid, we'll go along with it. This should\r
- * allow sharing of uids between several login names whilst\r
- * coping correctly with people who have su'ed.\r
- */\r
- user = getlogin();\r
- setpwent();\r
- if (user)\r
- p = getpwnam(user);\r
- else\r
- p = NULL;\r
- if (p && p->pw_uid == uid) {\r
- /*\r
- * The result of getlogin() really does correspond to\r
- * our uid. Fine.\r
- */\r
- ret = user;\r
- } else {\r
- /*\r
- * If that didn't work, for whatever reason, we'll do\r
- * the simpler version: look up our uid in the password\r
- * file and map it straight to a name.\r
- */\r
- p = getpwuid(uid);\r
- ret = p->pw_name;\r
- }\r
- endpwent();\r
-\r
- return ret;\r
- }\r
return NULL;\r
}\r
\r
}\r
\r
/*\r
+ * Stubs for the GUI feedback mechanism in Windows PSCP.\r
+ */\r
+void gui_update_stats(char *name, unsigned long size,\r
+ int percentage, unsigned long elapsed,\r
+ unsigned long done, unsigned long eta,\r
+ unsigned long ratebs) {}\r
+void gui_send_errcount(int list, int errs) {}\r
+void gui_send_char(int is_stderr, int c) {}\r
+void gui_enable(char *arg) {}\r
+\r
+\r
+/*\r
* Set local current directory. Returns NULL on success, or else an\r
* error message which must be freed after printing.\r
*/\r