projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
379d3d1
)
weston-launch: Check result of pam_start.
author
John Kåre Alsaker
<john.kare.alsaker@gmail.com>
Fri, 12 Oct 2012 10:25:05 +0000
(12:25 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 16 Oct 2012 15:26:00 +0000
(11:26 -0400)
src/weston-launch.c
patch
|
blob
|
history
diff --git
a/src/weston-launch.c
b/src/weston-launch.c
index
36f9c6b
..
cb69968
100644
(file)
--- a/
src/weston-launch.c
+++ b/
src/weston-launch.c
@@
-157,6
+157,12
@@
setup_pam(struct weston_launch *wl)
wl->pc.appdata_ptr = wl;
err = pam_start("login", wl->pw->pw_name, &wl->pc, &wl->ph);
+ if (err != PAM_SUCCESS) {
+ fprintf(stderr, "failed to start pam transaction: %d: %s\n",
+ err, pam_strerror(wl->ph, err));
+ return -1;
+ }
+
err = pam_set_item(wl->ph, PAM_TTY, ttyname(wl->tty));
if (err != PAM_SUCCESS) {
fprintf(stderr, "failed to set PAM_TTY item: %d: %s\n",