From: Lucas Di P. <ldi...@us...> - 2006-09-04 20:01:31
|
Update of /cvsroot/bacula/bacula/src/pygtk-console In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30511 Modified Files: Models.py bacula.i Log Message: Changes were made to wrap and use the new functions cram_md5_challenge() and cram_md5_respond() Index: bacula.i =================================================================== RCS file: /cvsroot/bacula/bacula/src/pygtk-console/bacula.i,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bacula.i 19 Dec 2005 19:36:03 -0000 1.3 +++ bacula.i 4 Sep 2006 20:01:28 -0000 1.4 @@ -33,10 +33,10 @@ %{ #include "bacula.h" -/* Wrapper function to avoid int* */ -int wrap_cram_md5_get_auth(BSOCK *bs, char *password, int tls_remote_need) +/* Wrapper function to avoid int*a on 'tls_remote_need' and 'compatible' args */ +int wrap_cram_md5_respond(BSOCK *bs, char *password, int tls_remote_need, int compatible) { - return cram_md5_get_auth(bs, password, &tls_remote_need); + return cram_md5_respond(bs, password, &tls_remote_need, &compatible); } char * get_md5(char *clear_password) @@ -87,8 +87,8 @@ extern bool bnet_sig(BSOCK * bs, int sig); extern void bnet_close(BSOCK * bsock); -extern int wrap_cram_md5_get_auth(BSOCK *bs, char *password, int tls_remote_need); -extern int cram_md5_auth(BSOCK *bs, char *password, int tls_local_need); +extern int wrap_cram_md5_respond(BSOCK *bs, char *password, int tls_remote_need, int compatible); +extern int cram_md5_challenge(BSOCK *bs, char *password, int tls_local_need, int compatible); extern bool is_bnet_stop (BSOCK *bsock); extern int bnet_set_blocking (BSOCK *bsock); extern int bnet_set_nonblocking (BSOCK *bsock); Index: Models.py =================================================================== RCS file: /cvsroot/bacula/bacula/src/pygtk-console/Models.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Models.py 9 Apr 2006 01:02:22 -0000 1.45 +++ Models.py 4 Sep 2006 20:01:28 -0000 1.46 @@ -92,8 +92,10 @@ # Connection attempt bacula.bnet_fsend(conn, "Hello *UserAgent* calling\n") - bacula.wrap_cram_md5_get_auth(conn, password, bacula.BNET_TLS_NONE) - bacula.cram_md5_auth(conn, password, bacula.BNET_TLS_NONE) + # Note: the last args on both next function calls are the new + # 'compatible' argument on Bacula MD5 functions + bacula.wrap_cram_md5_respond(conn, password, bacula.BNET_TLS_NONE, 1) + bacula.cram_md5_challenge(conn, password, bacula.BNET_TLS_NONE, 1) if bacula.bnet_recv(conn) <= 0: return False |