hello,

i think pdb_mysql (and pdb_xml as well) still do not have the recent 
passdb-changes.

attached patch for pdb_mysql is untested. 
jelmer, maybe you can have a look :)

bye,
guenther


On Mon, Nov 04, 2002 at 04:43:36PM +1100, xfesty wrote:
> Hiya...
> 
> Compiling the mysql module (cvs) isn't working too well.
> 
> I modify "srcdir" in the Makefile to /usr/src/samba/source (as per 
> README instructions), and I get the following:
> 
> root@serber[/usr/src/samba/examples/pdb/mysql]# make
> libtool gcc -O   -Iinclude -I/usr/src/samba/source/include 
> -I/usr/src/samba/source/ubiqx -I/usr/src/samba/source/smbwrapper  -I. 
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE   
> -I/usr/src/samba/source -c pdb_mysql.c
> rm -f .libs/pdb_mysql.lo
> gcc -O -Iinclude -I/usr/src/samba/source/include 
> -I/usr/src/samba/source/ubiqx -I/usr/src/samba/source/smbwrapper -I. 
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE 
> -I/usr/src/samba/source -c pdb_mysql.c  -fPIC -DPIC -o 
> .libs/pdb_mysql.lo
> pdb_mysql.c: In function `row_to_sam_account':
> pdb_mysql.c:232: too few arguments to function 
> `pdb_set_pass_last_set_time'
> pdb_mysql.c:235: too few arguments to function `pdb_set_username'
> pdb_mysql.c:236: too few arguments to function `pdb_set_domain'
> pdb_mysql.c:237: too few arguments to function `pdb_set_nt_username'
> pdb_mysql.c:238: too few arguments to function `pdb_set_fullname'
> pdb_mysql.c:243: too few arguments to function `pdb_set_acct_desc'
> pdb_mysql.c:244: too few arguments to function `pdb_set_workstations'
> pdb_mysql.c:245: too few arguments to function `pdb_set_unknown_str'
> pdb_mysql.c:246: too few arguments to function `pdb_set_munged_dial'
> pdb_mysql.c:249: too few arguments to function `pdb_set_uid'
> pdb_mysql.c:251: too few arguments to function `pdb_set_gid'
> pdb_mysql.c:254: too few arguments to function `pdb_set_user_sid'
> pdb_mysql.c:256: too few arguments to function `pdb_set_group_sid'
> pdb_mysql.c:259: too few arguments to function `pdb_set_lanman_passwd'
> pdb_mysql.c:261: too few arguments to function `pdb_set_nt_passwd'
> pdb_mysql.c:268: too few arguments to function `pdb_set_acct_ctrl'
> pdb_mysql.c:269: too few arguments to function `pdb_set_unknown_3'
> pdb_mysql.c:270: too few arguments to function `pdb_set_logon_divs'
> pdb_mysql.c:271: too few arguments to function `pdb_set_hours_len'
> pdb_mysql.c:272: too few arguments to function `pdb_set_unknown_5'
> pdb_mysql.c:273: too few arguments to function `pdb_set_unknown_6'
> pdb_mysql.c: In function `mysqlsam_replace_sam_account':
> pdb_mysql.c:698: `FLAG_SAM_LOGONTIME' undeclared (first use in this 
> function)
> pdb_mysql.c:698: (Each undeclared identifier is reported only once
> pdb_mysql.c:698: for each function it appears in.)
> pdb_mysql.c:706: `FLAG_SAM_LOGOFFTIME' undeclared (first use in this 
> function)
> pdb_mysql.c:714: `FLAG_SAM_KICKOFFTIME' undeclared (first use in this 
> function)
> pdb_mysql.c:722: `FLAG_SAM_CANCHANGETIME' undeclared (first use in this 
> function)
> pdb_mysql.c:730: `FLAG_SAM_MUSTCHANGETIME' undeclared (first use in 
> this function)
> pdb_mysql.c:762: `FLAG_SAM_UID' undeclared (first use in this function)
> pdb_mysql.c:769: `FLAG_SAM_GID' undeclared (first use in this function)
> make: *** [pdb_mysql.lo] Error 1
> 
> The system is running Debian unstable (woody).
> 
> Cheers



-- 
Guenther Deschner                          [EMAIL PROTECTED]
SuSE Linux AG                                        GnuPG: 8EE11688
Berliner Str. 27                      phone:  +49 (0) 30 / 430944778
D-13507 Berlin                           fax:  +49 (0) 30 / 43732804
--- examples/pdb/mysql/pdb_mysql.c      Fri Sep 27 09:42:18 2002
+++ examples/pdb/mysql/pdb_mysql.c      Sun Oct 13 00:16:41 2002
@@ -229,48 +229,48 @@
        pdb_set_logon_time(u, xatol(row[0]), FALSE);
        pdb_set_logoff_time(u, xatol(row[1]), FALSE);
        pdb_set_kickoff_time(u, xatol(row[2]), FALSE);
-       pdb_set_pass_last_set_time(u, xatol(row[3]));
+       pdb_set_pass_last_set_time(u, xatol(row[3]), PDB_SET);
        pdb_set_pass_can_change_time(u, xatol(row[4]), FALSE);
        pdb_set_pass_must_change_time(u, xatol(row[5]), FALSE);
-       pdb_set_username(u, row[6]);
-       pdb_set_domain(u, row[7]);
-       pdb_set_nt_username(u, row[8]);
-       pdb_set_fullname(u, row[9]);
+       pdb_set_username(u, row[6], PDB_SET);
+       pdb_set_domain(u, row[7], PDB_SET);
+       pdb_set_nt_username(u, row[8], PDB_SET);
+       pdb_set_fullname(u, row[9], PDB_SET);
        pdb_set_homedir(u, row[10], True);
        pdb_set_dir_drive(u, row[11], True);
        pdb_set_logon_script(u, row[12], True);
        pdb_set_profile_path(u, row[13], True);
-       pdb_set_acct_desc(u, row[14]);
-       pdb_set_workstations(u, row[15]);
-       pdb_set_unknown_str(u, row[16]);
-       pdb_set_munged_dial(u, row[17]);
+       pdb_set_acct_desc(u, row[14], PDB_SET);
+       pdb_set_workstations(u, row[15], PDB_SET);
+       pdb_set_unknown_str(u, row[16], PDB_SET);
+       pdb_set_munged_dial(u, row[17], PDB_SET);
 
        if (row[18])
-               pdb_set_uid(u, xatol(row[18]));
+               pdb_set_uid(u, xatol(row[18]), PDB_SET);
        if (row[19])
-               pdb_set_gid(u, xatol(row[19]));
+               pdb_set_gid(u, xatol(row[19]), PDB_SET);
 
        string_to_sid(&sid, row[20]);
-       pdb_set_user_sid(u, &sid);
+       pdb_set_user_sid(u, &sid, PDB_SET);
        string_to_sid(&sid, row[21]);
-       pdb_set_group_sid(u, &sid);
+       pdb_set_group_sid(u, &sid, PDB_SET);
 
-       if (pdb_gethexpwd(row[22], temp))
-               pdb_set_lanman_passwd(u, temp);
-       if (pdb_gethexpwd(row[23], temp))
-               pdb_set_nt_passwd(u, temp);
+       if (pdb_gethexpwd(row[22], temp), PDB_SET)
+               pdb_set_lanman_passwd(u, temp, PDB_SET);
+       if (pdb_gethexpwd(row[23], temp), PDB_SET)
+               pdb_set_nt_passwd(u, temp, PDB_SET);
 
        /* Only use plaintext password storage when lanman and nt are
         * NOT used */
        if (!row[22] || !row[23])
                pdb_set_plaintext_passwd(u, row[24]);
 
-       pdb_set_acct_ctrl(u, xatol(row[25]));
-       pdb_set_unknown_3(u, xatol(row[26]));
-       pdb_set_logon_divs(u, xatol(row[27]));
-       pdb_set_hours_len(u, xatol(row[28]));
-       pdb_set_unknown_5(u, xatol(row[29]));
-       pdb_set_unknown_6(u, xatol(row[30]));
+       pdb_set_acct_ctrl(u, xatol(row[25]), PDB_SET);
+       pdb_set_unknown_3(u, xatol(row[26]), PDB_SET);
+       pdb_set_logon_divs(u, xatol(row[27]), PDB_SET);
+       pdb_set_hours_len(u, xatol(row[28]), PDB_SET);
+       pdb_set_unknown_5(u, xatol(row[29]), PDB_SET);
+       pdb_set_unknown_6(u, xatol(row[30]), PDB_SET);
 
        return NT_STATUS_OK;
 }
@@ -695,7 +695,7 @@
                                                                                   
CONFIG_ACCT_CTRL_DEFAULT),
                                                pdb_get_acct_ctrl(newpwd));
 
-       if (store & FLAG_SAM_LOGONTIME) {
+       if (store & PDB_LOGONTIME) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data,
                                                                                       
    "logon time column",
@@ -703,7 +703,7 @@
                                                        pdb_get_logon_time(newpwd));
        }
 
-       if (store & FLAG_SAM_LOGOFFTIME) {
+       if (store & PDB_LOGOFFTIME) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data,
                                                                                       
    "logoff time column",
@@ -711,7 +711,7 @@
                                                        pdb_get_logoff_time(newpwd));
        }
 
-       if (store & FLAG_SAM_KICKOFFTIME) {
+       if (store & PDB_KICKOFFTIME) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data,
                                                                                       
    "kickoff time column",
@@ -719,7 +719,7 @@
                                                        pdb_get_kickoff_time(newpwd));
        }
 
-       if (store & FLAG_SAM_CANCHANGETIME) {
+       if (store & PDB_CANCHANGETIME) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data,
                                                                                       
    "pass can change time column",
@@ -727,7 +727,7 @@
                                                        
pdb_get_pass_can_change_time(newpwd));
        }
 
-       if (store & FLAG_SAM_MUSTCHANGETIME) {
+       if (store & PDB_MUSTCHANGETIME) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data,
                                                                                       
    "pass must change time column",
@@ -759,14 +759,14 @@
                                                        pdb_get_logon_divs(newpwd));
        }
 
-       if (store & FLAG_SAM_UID) {
+       if (store & PDB_UID) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data, "uid 
column",
                                                                                       
    CONFIG_UID_DEFAULT),
                                                        pdb_get_uid(newpwd));
        }
 
-       if (store & FLAG_SAM_GID) {
+       if (store & PDB_GID) {
                pdb_mysql_int_field(methods, &query,
                                                        config_value_write(data, "gid 
column",
                                                                                       
    CONFIG_GID_DEFAULT),

Attachment: msg07809/pgp00000.pgp
Description: PGP signature

Reply via email to