summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
Diffstat (limited to 'sesman')
-rw-r--r--sesman/chansrv/clipboard_file.c8
-rw-r--r--sesman/env.c6
-rw-r--r--sesman/sesman.c14
3 files changed, 23 insertions, 5 deletions
diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c
index 96f1b0e8..ff95b0a0 100644
--- a/sesman/chansrv/clipboard_file.c
+++ b/sesman/chansrv/clipboard_file.c
@@ -446,7 +446,13 @@ clipboard_send_file_data(int streamId, int lindex,
full_fn);
return 1;
}
- g_file_seek(fd, nPositionLow);
+ if (g_file_seek(fd, nPositionLow) < 0)
+ {
+ log_message(LOG_LEVEL_ERROR, "clipboard_send_file_data: seek error "
+ "in file: %s\n", full_fn);
+ g_file_close(fd);
+ return 1;
+ }
make_stream(s);
init_stream(s, cbRequested + 64);
size = g_file_read(fd, s->data + 12, cbRequested);
diff --git a/sesman/env.c b/sesman/env.c
index 26d1a4f7..227f6bbf 100644
--- a/sesman/env.c
+++ b/sesman/env.c
@@ -129,7 +129,11 @@ env_set_user(char *username, char *passwd_file, int display,
{
/* if no auth_file_path is set, then we go for
$HOME/.vnc/sesman_username_passwd */
- g_mkdir(".vnc");
+ if (g_mkdir(".vnc") < 0)
+ {
+ log_message(LOG_LEVEL_ERROR,
+ "env_set_user: error creating .vnc dir");
+ }
g_sprintf(passwd_file, "%s/.vnc/sesman_%s_passwd", pw_dir, username);
}
else
diff --git a/sesman/sesman.c b/sesman/sesman.c
index db755a65..964bc740 100644
--- a/sesman/sesman.c
+++ b/sesman/sesman.c
@@ -308,9 +308,17 @@ main(int argc, char **argv)
g_file_close(1);
g_file_close(2);
- g_file_open("/dev/null");
- g_file_open("/dev/null");
- g_file_open("/dev/null");
+ if (g_file_open("/dev/null") < 0)
+ {
+ }
+
+ if (g_file_open("/dev/null") < 0)
+ {
+ }
+
+ if (g_file_open("/dev/null") < 0)
+ {
+ }
}
/* initializing locks */