Deleted Added
full compact
sftp-server-main.c (181111) sftp-server-main.c (192595)
1/* $OpenBSD: sftp-server-main.c,v 1.3 2008/03/26 23:44:41 djm Exp $ */
1/* $OpenBSD: sftp-server-main.c,v 1.4 2009/02/21 19:32:04 tobias Exp $ */
2/*
3 * Copyright (c) 2008 Markus Friedl. All rights reserved.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 27 unchanged lines hidden (view full) ---

37main(int argc, char **argv)
38{
39 struct passwd *user_pw;
40
41 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
42 sanitise_stdfd();
43
44 if ((user_pw = getpwuid(getuid())) == NULL) {
2/*
3 * Copyright (c) 2008 Markus Friedl. All rights reserved.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 27 unchanged lines hidden (view full) ---

37main(int argc, char **argv)
38{
39 struct passwd *user_pw;
40
41 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
42 sanitise_stdfd();
43
44 if ((user_pw = getpwuid(getuid())) == NULL) {
45 fprintf(stderr, "No user found for uid %lu", (u_long)getuid());
45 fprintf(stderr, "No user found for uid %lu\n",
46 (u_long)getuid());
46 return 1;
47 }
48
49 return (sftp_server_main(argc, argv, user_pw));
50}
47 return 1;
48 }
49
50 return (sftp_server_main(argc, argv, user_pw));
51}