View | Details | Raw Unified | Return to bug 2311
Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +15 lines)
Line  Link Here
--
1
mux.c |   14 ++++++++++++++
mux.c |   14 ++++++++++++++
2
1 file changed, 14 insertions(+)
1
1 file changed, 14 insertions(+)
3
-- a/mux.c
2
++ b/mux.c
Lines 2087-2092 muxclient(const char *path) Link Here
2087
	socklen_t sun_len;
2087
	socklen_t sun_len;
2088
	int sock;
2088
	int sock;
2089
	u_int pid;
2089
	u_int pid;
2090
	struct stat filestat;
2090
2091
2091
	if (muxclient_command == 0) {
2092
	if (muxclient_command == 0) {
2092
		if (stdio_forward_host != NULL)
2093
		if (stdio_forward_host != NULL)
Lines 2118-2123 muxclient(const char *path) Link Here
2118
	if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
2119
	if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
2119
		fatal("%s socket(): %s", __func__, strerror(errno));
2120
		fatal("%s socket(): %s", __func__, strerror(errno));
2120
2121
2122
	/* Check file perms, hard link count, and ownership */
2123
	if (stat(path, &filestat) == 0) {
2124
		if (filestat.st_uid != geteuid())
2125
			fatal("You do not own the file specified by "
2126
			     "ControlPath \"%.100s\"", path);
2127
		if (filestat.st_mode & 0177)	
2128
			fatal("File specified by ControlPath \"%.100s\" "
2129
			     "must have permissions 600", path);
2130
		if (filestat.st_nlink > 1)	
2131
			fatal("File specified by ControlPath \"%.100s\" "
2132
			     "has more than one hard link", path);
2133
	}
2134
2121
	if (connect(sock, (struct sockaddr *)&addr, sun_len) == -1) {
2135
	if (connect(sock, (struct sockaddr *)&addr, sun_len) == -1) {
2122
		switch (muxclient_command) {
2136
		switch (muxclient_command) {
2123
		case SSHMUX_COMMAND_OPEN:
2137
		case SSHMUX_COMMAND_OPEN:

Return to bug 2311