Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 6612 | Differences between
and this patch

Collapse All | Expand All

(-)Linux-PAM-0.75/modules/pam_console/config.y.orig (-3 / +27 lines)
Lines 190-202 Link Here
190
		if (check_one_console_name(consolename, this_list->data)) {
190
		if (check_one_console_name(consolename, this_list->data)) {
191
		    g_hash_table_insert(consoleHash, c, c);
191
		    g_hash_table_insert(consoleHash, c, c);
192
		    found = 1;
192
		    found = 1;
193
		} else {
194
			/* consolename may contain the full path to the tty --
195
			 * notebly pam-login sets PAM_TTY to a fully qualified filename.
196
			 */
197
			strcpy(full_path, "/dev/");
198
			strncat(full_path, this_list->data,
199
				sizeof(full_path) - 1 - strlen(full_path));
200
			full_path[sizeof(full_path) - 1] = '\0';
201
			if (check_one_console_name(consolename, full_path)) {
202
				g_hash_table_insert(consoleHash, c, c);
203
				found = 1;
204
			}
193
		}
205
		}
194
	    }
206
	    }
195
	} else {
207
	} else {
196
	    if (check_one_console_name(consolename, c->name)) {
208
	    if (check_one_console_name(consolename, c->name)) {
197
		g_hash_table_insert(consoleHash, c, c);
209
		    g_hash_table_insert(consoleHash, c, c);
198
		found = 1;
210
		    found = 1;
199
	    }
211
	    } else {
212
			/* consolename may contain the full path to the tty --
213
			 * notebly pam-login sets PAM_TTY to a fully qualified filename.
214
			 */
215
			strcpy(full_path, "/dev/");
216
			strncat(full_path, c->name,
217
				sizeof(full_path) - 1 - strlen(full_path));
218
			full_path[sizeof(full_path) - 1] = '\0';
219
			if (check_one_console_name(consolename, full_path)) {
220
				g_hash_table_insert(consoleHash, c, c);
221
				found = 1;
222
			}
223
		}
200
	}
224
	}
201
    }
225
    }
202
226

Return to bug 6612