G'day. I have a few bug'z when using the Mysql backend.. ./configure --with-static-modules=pdb_mysql gives a lot of error's the mysql backend doesn't compile as an static module.. it say's: - compiling smbd/server.c - linking bin/smdb - passdb/pdb_mysql.o (.text+0x1c6) in function 'pdb_mysql_string_fielt' - : undefind reference to 'mysql_realexcape_string' and it goes on and on, with these .text/mysql error's and stops compiling Also if you compile it the normalway (shared) no prob's except, if one is using the User-Manager from NT4. (the passwd/imap is working fine with it!!) I Use Redhat 9.0 / mysql 3.23.43 / Samba 3.0.1pre3 Greetz. Collen Blijenberg (MLHJ)
Hi Again Collen :-) Can you check whether PASSDBLIBS in Makefile contains -lmysqlclient ?
Well g'day Jelmer.. how's it going.. there is a passdb_libs= -L/usr/lib/mysql -lmysqlclient ............ (and more) line, so yes there is.. here is also a dump of the error itself.. (just incase..) ------------------------ Compiling sam/idmap_ldap.c Compiling sam/idmap_tdb.c Linking bin/winbindd passdb/pdb_mysql.o(.text+0x181): In function `pdb_mysql_string_field': passdb/pdb_mysql.c:125: undefined reference to `mysql_real_escape_string' passdb/pdb_mysql.o(.text+0x37c): In function `row_to_sam_account': passdb/pdb_mysql.c:219: undefined reference to `mysql_num_fields' passdb/pdb_mysql.o(.text+0x384):passdb/pdb_mysql.c:220: undefined reference to `mysql_fetch_row' passdb/pdb_mysql.o(.text+0x99f): In function `mysqlsam_setsampwent': passdb/pdb_mysql.c:344: undefined reference to `mysql_query' passdb/pdb_mysql.o(.text+0x9f8):passdb/pdb_mysql.c:358: undefined reference to `mysql_error' passdb/pdb_mysql.o(.text+0xa2a):passdb/pdb_mysql.c:353: undefined reference to `mysql_store_result' passdb/pdb_mysql.o(.text+0xa72):passdb/pdb_mysql.c:357: undefined reference to `mysql_error' passdb/pdb_mysql.o(.text+0xaee):passdb/pdb_mysql.c:365: undefined reference to `mysql_num_rows' passdb/pdb_mysql.o(.text+0xbb5): In function `mysqlsam_endsampwent': passdb/pdb_mysql.c:383: undefined reference to `mysql_free_result' passdb/pdb_mysql.o(.text+0xe97): In function `mysqlsam_select_by_field': passdb/pdb_mysql.c:433: undefined reference to `mysql_real_escape_string' passdb/pdb_mysql.o(.text+0x11c5):passdb/pdb_mysql.c:511: undefined reference to `mysql_query' passdb/pdb_mysql.o(.text+0x1221):passdb/pdb_mysql.c:519: undefined reference to `mysql_error' passdb/pdb_mysql.o(.text+0x1252):passdb/pdb_mysql.c:522: undefined reference to `mysql_store_result' passdb/pdb_mysql.o(.text+0x1272):passdb/pdb_mysql.c:530: undefined reference to `mysql_free_result' passdb/pdb_mysql.o(.text+0x12c4):passdb/pdb_mysql.c:526: undefined reference to `mysql_error' passdb/pdb_mysql.o(.text+0x17dd): In function `mysqlsam_delete_sam_account': passdb/pdb_mysql.c:617: undefined reference to `mysql_real_escape_string' passdb/pdb_mysql.o(.text+0x184b):passdb/pdb_mysql.c:629: undefined reference to `mysql_query' passdb/pdb_mysql.o(.text+0x18a7):passdb/pdb_mysql.c:637: undefined reference to `mysql_error' passdb/pdb_mysql.o(.text+0x20cd): In function `mysqlsam_replace_sam_account': passdb/pdb_mysql.c:849: undefined reference to `mysql_query' passdb/pdb_mysql.o(.text+0x2122):passdb/pdb_mysql.c:853: undefined reference to `mysql_error' passdb/pdb_mysql.o(.text+0x25ea): In function `mysqlsam_init': passdb/pdb_mysql.c:925: undefined reference to `mysql_init' passdb/pdb_mysql.o(.text+0x26ed):passdb/pdb_mysql.c:931: undefined reference to `mysql_real_connect' passdb/pdb_mysql.o(.text+0x2732):passdb/pdb_mysql.c:940: undefined reference to `mysql_error' collect2: ld returned 1 exit status make: *** [bin/winbindd] Error 1 [root@hermes source]# ------------------------------------ dunno where to look for.. ? maby mysql can't be compile in as static module ? strainge btw, as shared module there where no probs with compiling, just when using it (You know, the array bound are invalid/stub received bad data error..) as passdb backend... Greet's Collen Blijenberg (MLHJ)
Created attachment 268 [details] Link winbindd with passdb libs
Please try the following patch.
I've tested this at home and verified that the given patch fixes the bug. If you still get problems, please not that ./configure (in this case) requires both --with-expsam=mysql and --with-static-modules=pdb_mysql
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
database cleanup