Index: examples/bugzc/submit_bug.c
===================================================================
--- examples/bugzc/submit_bug.c	(revision 23)
+++ examples/bugzc/submit_bug.c	(working copy)
@@ -13,6 +13,7 @@
 #include<stdio.h>
 #include<string.h>
 #include<stdlib.h>
+#include<unistd.h>
 #include<bugzc/bugzc.h>
 
 char *fgets_s(char *str, size_t siz, FILE *fptr){
@@ -29,10 +30,8 @@
 int main(int argc, char *argv[]){
 	char *url;
 	char *login;
-	char pw[24];
+	char *pass;
 	char version[12];
-	int i;
-
 	char product[65];
 	char component[65];
 	char summary[256];
@@ -48,15 +47,15 @@
 
 	description[0] = 0;
 	if(argc <= 1){
-		fprintf(stderr, "At least you must provide bugzilla's server url\n");
+		fprintf(stderr, "At least you must provide bugzilla's server url and login\n");
 		return 0;
 	}
 	if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){
-		printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n");
+		printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n", argv[0], argv[0]);
 		return 0;
 	}
 	url = argv[1];
-
+	login = argv[2];
 	bugzc_init2(&conn, url);
 	printf("Bugzilla version at: %s ", conn.url);
 	fflush(stdout);
@@ -78,20 +77,9 @@
 		fprintf(stderr, "%s\n", conn.xenv.fault_string);
 		return 1;
 	}
-	if(argc > 2){
-		login = argv[2];
-		printf("\nLogin ");
-	}
-	else{
-		login = malloc(100);
-		printf("\nLogin (or e-mail): ");
-		login[99] = 0;
-		fgets_s(login, 98, stdin);
-	}
-	printf("Password: ");
-	fgets_s(pw, 23, stdin);
+	pass = getpass("Enter bugzilla password: ");
 	/* Perform login */
-	if(bugzc_user_login(&conn, login, pw, 0) < 0){
+	if(bugzc_user_login(&conn, login, pass, 0) < 0){
 		if(conn.err_code != 0){
 			fprintf(stderr, "\n");
 			if(conn.xenv.fault_occurred){
@@ -104,7 +92,6 @@
 		}
 		return 1;
 	}
-	pw[0] = 0;
 	printf("Product: ");
 	fgets_s(product, 64, stdin);
 	printf("Component: ");
Index: examples/bugzc/get_products.c
===================================================================
--- examples/bugzc/get_products.c	(revision 23)
+++ examples/bugzc/get_products.c	(working copy)
@@ -13,6 +13,7 @@
 #include<stdio.h>
 #include<string.h>
 #include<stdlib.h>
+#include<unistd.h>
 #include<bugzc/bugzc.h>
 
 
@@ -67,9 +68,7 @@
 int main(int argc, char *argv[]){
 	char *url;
 	char *login;
-	char *field_name;
-	char *product_name;
-	char pw[24];
+	char *pass;
 	char version[12];
 	int *p_ids;
 	int i;
@@ -78,16 +77,16 @@
 	bugzc_list p_list;
 	bugzc_conn conn;
 	bugzc_node *node;
-	if(argc <= 1){
-		fprintf(stderr, "At least you must provide bugzilla's server url\n");
+	if(argc <= 2){
+		fprintf(stderr, "At least you must provide bugzilla's server url and login\n");
 		return 0;
 	}
 	if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){
-		printf("%s --help\n%s <url> [username]\n\n");
+		printf("%s --help\n%s <url> [username]\n\n", argv[0], argv[0]);
 		return 0;
 	}
 	url = argv[1];
-
+	login = argv[2];
 	bugzc_init2(&conn, url);
 	printf("Bugzilla version at: %s ", conn.url);
 	fflush(stdout);
@@ -109,20 +108,9 @@
 		fprintf(stderr, "%s\n", conn.xenv.fault_string);
 		return 1;
 	}
-	if(argc > 2){
-		login = argv[2];
-		printf("\nLogin ");
-	}
-	else{
-		login = malloc(100);
-		printf("\nLogin (or e-mail): ");
-		login[99] = 0;
-		fgets(login, 98, stdin);
-	}
-	printf("Password: ");
-	fgets(pw, 23, stdin);
+	pass = getpass("Enter bugzilla password: ");
 	/* Perform login */
-	if(bugzc_user_login(&conn, login, pw, 0) < 0){
+	if(bugzc_user_login(&conn, login, pass, 0) < 0){
 		if(conn.err_code != 0){
 			fprintf(stderr, "\n");
 			if(conn.xenv.fault_occurred){
@@ -135,7 +123,6 @@
 		}
 		return 1;
 	}
-	pw[0] = 0;
 	bugzc_list_create(&list);
 	printf("Selectable product ids: ");
 	if(bugzc_product_get_selectable_products(&conn, &list) < 0){
Index: examples/bugzc/get_legal_field_values.c
===================================================================
--- examples/bugzc/get_legal_field_values.c	(revision 23)
+++ examples/bugzc/get_legal_field_values.c	(working copy)
@@ -13,6 +13,7 @@
 #include<stdio.h>
 #include<string.h>
 #include<stdlib.h>
+#include<unistd.h>
 #include<bugzc/bugzc.h>
 
 char *fgets_s(char *str, size_t siz, FILE *fptr){
@@ -31,22 +32,21 @@
 	char *login;
 	char *field_name;
 	char *product_name;
-	char pw[24];
+	char *pass;
 	char version[12];
 	bugzc_list list;
-	int i;
 	bugzc_conn conn;
 	bugzc_node *node;
-	if(argc <= 1){
-		fprintf(stderr, "At least you must provide bugzilla's server url\n");
+	if(argc <= 2){
+		fprintf(stderr, "At least you must provide bugzilla's server url and login\n");
 		return 0;
 	}
 	if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){
-		printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n");
+		printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n", argv[0], argv[0]);
 		return 0;
 	}
 	url = argv[1];
-
+	login = argv[2];
 	bugzc_init2(&conn, url);
 	printf("Bugzilla version at: %s ", conn.url);
 	fflush(stdout);
@@ -68,20 +68,9 @@
 		fprintf(stderr, "%s\n", conn.xenv.fault_string);
 		return 1;
 	}
-	if(argc > 2){
-		login = argv[2];
-		printf("\nLogin ");
-	}
-	else{
-		login = malloc(100);
-		printf("\nLogin (or e-mail): ");
-		login[99] = 0;
-		fgets(login, 98, stdin);
-	}
-	printf("Password: ");
-	fgets(pw, 23, stdin);
+	pass = getpass("Enter bugzilla password: ");
 	/* Perform login */
-	if(bugzc_user_login(&conn, login, pw, 0) < 0){
+	if(bugzc_user_login(&conn, login, pass, 0) < 0){
 		if(conn.err_code != 0){
 			fprintf(stderr, "\n");
 			if(conn.xenv.fault_occurred){
@@ -94,7 +83,6 @@
 		}
 		return 1;
 	}
-	pw[0] = 0;
 	if(argc > 3){
 		field_name = argv[3];
 		if(argc > 4) printf("\n");
Index: examples/bugzc/bugz_create_user.c
===================================================================
--- examples/bugzc/bugz_create_user.c	(revision 23)
+++ examples/bugzc/bugz_create_user.c	(working copy)
@@ -13,6 +13,7 @@
 #include<stdio.h>
 #include<string.h>
 #include<stdlib.h>
+#include<unistd.h>
 #include<bugzc/bugzc.h>
 
 char *fgets_s(char *str, size_t siz, FILE *fptr){
@@ -29,13 +30,13 @@
 int main(int argc, char *argv[]){
 	char *url;
 	char *login;
-	char pw[24];
+	char *pass;
 	char email[80];
 	char fullname[80];
 	char password[80];
 	char version[12];
 	bugzc_conn conn;
-	if(argc <= 1){
+	if(argc <= 2){
 		fprintf(stderr, "At least you must provide bugzilla's server url" \
 						" and your user login after that.\n");
 		return 0;
@@ -45,7 +46,6 @@
 
 	bugzc_init2(&conn, url);
 	printf("Bugzilla version at: %s ", conn.url);
-	fflush(stdout);
 	if(bugzc_bugzilla_version(&conn, version, 12) < 0){
 		if(conn.err_code != 0){
 			fprintf(stderr, "\n");
@@ -59,9 +59,9 @@
 		return 1;
 	}
 	printf("is %s\n", version);
-	printf("Enter password for %s: ", login);
-	fgets(pw, 23, stdin);
-	if(bugzc_user_login(&conn, login, pw, 0) < 0){
+	fflush(stdout);
+	pass = getpass("Enter bugzilla password: ");
+	if(bugzc_user_login(&conn, login, pass, 0) < 0){
 		if(conn.err_code != 0){
 			fprintf(stderr, "\n");
 			if(conn.xenv.fault_occurred){
@@ -73,7 +73,6 @@
 		}
 		return 1;
 	}
-	pw[0] = 0;
 	printf("Ready to create new user account...\n");
 	printf("e-mail: ");
 	fgets_s(email, 79, stdin);
Index: examples/bugzc/testlogin.c
===================================================================
--- examples/bugzc/testlogin.c	(revision 23)
+++ examples/bugzc/testlogin.c	(working copy)
@@ -13,22 +13,23 @@
 #include<stdio.h>
 #include<string.h>
 #include<stdlib.h>
+#include<unistd.h>
 #include<bugzc/bugzc.h>
 
 
 int main(int argc, char *argv[]){
 	char *url;
 	char *login;
-	char pw[24];
+	char *pass;
 	char version[12];
 	char tzone[12];
 	bugzc_conn conn;
-	if(argc <= 1){
-		fprintf(stderr, "At least you must provide bugzilla's server url\n");
+	if(argc <= 2){
+		fprintf(stderr, "At least you must provide bugzilla's server url and login\n");
 		return 0;
 	}
 	url = argv[1];
-
+	login = argv[2];
 	bugzc_init2(&conn, url);
 	printf("Bugzilla version at: %s ", conn.url);
 	fflush(stdout);
@@ -50,20 +51,9 @@
 		fprintf(stderr, "%s\n", conn.xenv.fault_string);
 		return 1;
 	}
-	if(argc > 2){
-		login = argv[2];
-		printf("\nLogin ");
-	}
-	else{
-		login = malloc(1024);
-		printf("\nLogin (or e-mail): ");
-		login[1023] = 0;
-		fgets(login, 1022, stdin);
-	}
-	printf("Password: ");
-	fgets(pw, 23, stdin);
+	pass = getpass("Enter bugzilla password: ");
 	/* Perform login */
-	if(bugzc_user_login(&conn, login, pw, 0) < 0){
+	if(bugzc_user_login(&conn, login, pass, 0) < 0){
 		if(conn.err_code != 0){
 			fprintf(stderr, "\n");
 			if(conn.xenv.fault_occurred){
@@ -76,7 +66,6 @@
 		}
 		return 1;
 	}
-	pw[0] = 0;
 	printf("Server timezone: ");
 	fflush(stdout);
 	if(bugzc_bugzilla_timezone(&conn, tzone, 12) < 0){
