Skip to content

Commit 44aaa48

Browse files
committed
cs-backup-locker.c: Exit gracefully if incorrect arguments are
given, instead of crashing.
1 parent 60ad855 commit 44aaa48

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backup-locker/cs-backup-locker.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,11 @@ main (int argc,
631631

632632
g_debug ("backup-locker: initializing");
633633

634+
if (!xid_str || !term_tty_str || !session_tty_str) {
635+
g_critical ("xid, term and session arguments are mandatory, exiting.");
636+
exit (1);
637+
}
638+
634639
gulong xid = term_tty = session_tty = 0;
635640

636641
xid = strtoul (xid_str, NULL, 0);

0 commit comments

Comments
 (0)