[X2Go-Commits] libpam-x2go.git - build-main (branch) updated: 55e28977cad16a59abecbe5857fbebfefab4f811
X2Go dev team
git-admin at x2go.org
Sat Apr 27 13:45:33 CEST 2013
The branch, build-main has been updated
via 55e28977cad16a59abecbe5857fbebfefab4f811 (commit)
from a17c0a60a2e3f036cf54013f0402c18a5f0768cf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
src/pam-freerdp.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
The diff of changes is:
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 33105d4..5696bbd 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -264,6 +264,7 @@ session_socket_handler (struct passwd * pwdent, const char * ruser, const char *
/* Our buffer */
char * buffer = NULL;
int buffer_len = 0;
+ int buffer_fill = 0;
/* Track write out */
int writedata = 0;
@@ -294,8 +295,18 @@ session_socket_handler (struct passwd * pwdent, const char * ruser, const char *
}
/* Lock the buffer before writing */
- mlock(buffer, buffer_len);
- snprintf(buffer, buffer_len, "%s %s %s %s", ruser, password, rdomain, rhost);
+ if (mlock(buffer, buffer_len) != 0) {
+ /* We can't lock, we go home */
+ goto cleanup;
+ }
+
+ buffer_fill = snprintf(buffer, buffer_len, "%s %s %s %s", ruser, password, rdomain, rhost);
+ if (buffer_fill > buffer_len) {
+ /* This really shouldn't happen, but if for some reason we have an
+ difference between they way that the lengths are calculated we want
+ to catch that. */
+ goto cleanup;
+ }
/* Make our socket and bind it */
socketfd = socket(AF_UNIX, SOCK_STREAM, 0);
hooks/post-receive
--
libpam-x2go.git (Remote login session via X2Go (PAM module))
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libpam-x2go.git" (Remote login session via X2Go (PAM module)).
More information about the x2go-commits
mailing list