Opened 18 months ago
Closed 18 months ago
#1033 closed defect (fixed)
Options in ix-samba generation is out of synch with database schema
| Reported by: | gcooper | Owned by: | william |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Backend | Version: | 8.0.2-RELEASE |
| Keywords: | Cc: |
Description
ix-samba scripts check for 0/1, whereas the value set in the database is boolean (True/False?) for the 'guest ok' and 'guest only' options.
Similar things could be said for log level as well.
Change History (6)
comment:1 Changed 18 months ago by william
comment:2 Changed 18 months ago by gcooper
Output snippet from sh -c 'sh -x /etc/rc.d/ix-samba start 2>&1' | less :
cifs_srv_largerw,
cifs_srv_sendfile,
cifs_srv_easupport,
cifs_srv_dosattr,
cifs_srv_nullpw,
cifs_srv_aio_enable,
cifs_srv_aio_rs,
cifs_srv_aio_ws,
cifs_srv_homedir_enable,
cifs_srv_homedir_browseable_enable,
cifs_srv_homedir,
(
SELECT
srv_enable
FROM
services_services
WHERE
srv_service = '\''activedirectory'\''
ORDER BY
-id
LIMIT 1
) as cifs_srv_ad_enable,
(
SELECT
srv_enable
FROM
services_services
WHERE
srv_service = '\''ldap'\''
ORDER BY
-id
LIMIT 1
) as cifs_srv_ldap_enable,
ad_domainname,
ad_netbiosname,
ad_workgroup,
ad_adminname,
ad_adminpw,
ldap_hostname,
ldap_basedn,
ldap_anonbind,
ldap_rootbasedn,
ldap_rootbindpw,
ldap_pwencryption,
ldap_ssl,
ldap_usersuffix,
ldap_groupsuffix,
ldap_passwordsuffix,
ldap_machinesuffix
FROM
services_cifs
JOIN services_ldap ON (1 = 1)
JOIN services_activedirectory ON (1 = 1 )
ORDER BY
-services_cifs.id,
-services_ldap.id,
-services_activedirectory.id
LIMIT 1
'
+ read -r authmodel netbiosname workgroup cifs_description doscharset unixcharset loglevel localmaster timeserver guest guestok guestonly cifs_filemask cifs_dirmask largerw sendfile easupport dosattr nullpw cifs_aio_enable cifs_aio_rs cifs_aio_ws cifs_homedir cifs_homedir_browse
able cifs_homedir_mp ad_enable ldap_enable ad_domainname ad_netbiosname ad_workgroup ad_adminname ad_adminpw ldap_hostname ldap_basedn ldap_anonbind ldap_rootbasedn ldap_rootbindpw ldap_pwencryption ldap_ssl ldap_usersuffix ldap_groupsuffix ldap_passwordsuffix ldap_machinesuffix
+ [ -z nobody ]
+ cat
+ [ False = 1 ] <-- HERE
+ echo ' guest ok = no'
+ [ False = 1 ] <-- HERE
+ [ 0 = 0 ]
+ echo ' netbios name = freenas'
+ echo ' workgroup = FREENAS'
+ [ -n 'FreeNAS Server' ]
+ echo ' server string = FreeNAS Server'
This might not be isolated to ix-samba though.
comment:3 Changed 18 months ago by william
On other hand I cannot reproduce it:
easupport dosattr nullpw cifs_aio_enable cifs_aio_rs cifs_aio_ws cifs_homedir cifs_homedir_browseable cifs_homedir_mp ad_enable ldap_enable ad_domainname ad_netbiosname ad_workgroup ad_allow_trusted_doms ad_adminname ad_adminpw ldap_hostname ldap_basedn ldap_anonbind ldap_rootbasedn ldap_rootbindpw ldap_pwencryption ldap_ssl ldap_usersuffix ldap_groupsuffix ldap_passwordsuffix ldap_machinesuffix + [ -z nobody ] + cat + [ 0 = 1 ] + echo ' guest ok = no' + [ 0 = 1 ] + [ 0 = 0 ] + echo ' netbios name = freenas' + echo ' workgroup = FREENAS' + [ -n 'FreeNAS Server' ] + echo ' server string = FreeNAS Server' + [ 1 = 1 ] + echo ' use sendfile = yes' + [ 0 = 0 ] + echo ' large readwrite = no' + [ 0 = 1 ] + [ 1 = 1 ] + echo ' store dos attributes = yes' + [ 1 = 1 -a 0 != 1 ]
comment:4 Changed 18 months ago by william
Just for the record, the root cause is http://south.aeracode.org/ticket/578
comment:5 Changed 18 months ago by william
- Owner set to william
- Status changed from new to accepted
This should have been workarounded with r8806
comment:6 Changed 18 months ago by william
- Resolution set to fixed
- Status changed from accepted to closed
Note: See
TracTickets for help on using
tickets.

What you mean?
Sqlite store boolean as 0/1