Project

General

Profile

« Previous | Next » 

Revision 579946e2

Added by Scott Ullrich almost 19 years ago

MFC
pclose -> fclose

View differences:

etc/sshd
38 38
			echo "SSHD is disabled.";
39 39
		exit;
40 40
	}
41
	
41

  
42 42
	function file_size($file) {
43 43
	  $size = filesize($file);
44 44
	  return $size;
......
69 69
	conf_mount_rw();
70 70
	$fd = popen("/usr/sbin/pw usermod -n root -H 0", "w");
71 71
	fwrite($fd, $config['system']['password']);
72
	pclose($fd);
72
	fclose($fd);
73 73

  
74 74
	/* Make the admin passwords are the same as the web admin password. */
75 75
	$fd = popen("/usr/sbin/pw usermod -n admin -H 0", "w");
76 76
	fwrite($fd, $config['system']['password']);
77
	pclose($fd);
77
	fclose($fd);
78 78

  
79 79
	$sshConfigDir = "/etc/ssh";
80 80

  
......
102 102
	/* Write the new sshd config file */
103 103
	$fd = fopen("/etc/ssh/sshd_config", "w");
104 104
	fwrite($fd, $sshconf);
105
	pclose($fd);
105
	fclose($fd);
106 106

  
107 107
	/* mop up from a badly implemented ssh keys -> cf backup */
108 108
	if($config['ssh']['dsa_key'] <> "") {
......
115 115
		unset($config['ssh']['ak']);
116 116
		write_config("Clearing SSH keys from config.xml");
117 117
	}
118
	
118

  
119 119
	/* are we already running?  if so exit */
120 120
	if(file_exists("/tmp/keys_generating"))
121 121
		exit;
122
	
122

  
123 123
	if (!file_exists("$sshConfigDir/ssh_host_key") or file_exists("/etc/keys_generating")) {
124 124
		/* remove previous keys and regen later */
125 125
		file_notice("SSH", "pfSense has started creating your SSH keys.  SSH Startup will be delayed.  Please note that reloading the filter rules and changes will be delayed until this operation is completed.", "SSH KeyGen", "");
......
151 151
	} else {
152 152
		echo "done.\n";
153 153
	}
154
	
154

  
155 155
	conf_mount_ro();
156
	
157
	
158
	
159
	
160
	
161
	
162
	
163
	
164
	
165
	
166
	
167
	
168
	
169
	
170
	
171
	
172
	
173
	
174
	
175
	
176
	
177
	
178
	
179
	
180
	
181
	
182
	
183
	
184
	
185
	
186
	
187
	
188
	
189
	
190
	
191
	
192
	
193
	
156

  
157

  
158

  
159

  
160

  
161

  
162

  
163

  
164

  
165

  
166

  
167

  
168

  
169

  
170

  
171

  
172

  
173

  
174

  
175

  
176

  
177

  
178

  
179

  
180

  
181

  
182

  
183

  
184

  
185

  
186

  
187

  
188

  
189

  
190

  
191

  
192

  
193

  
194 194
	exit;
195 195

  
196 196
	/* exit early, this needs more testing. */

Also available in: Unified diff