Страница 1 из 2
Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 11:11:30
Dorlas
Добрый день.
Уже несколько часов упорно пытаюсь понять - есть ли такой VFS-модуль в Samba 3.x версий.
Пробовал ставить порты: samba3, samba32 и samba33
Везде в сырцах есть патчи:
Код: Выделить всё
newfs:/root@[14:04]# locate zfs | grep "samba"
/usr/ports/net/samba3/files/patch-vfs_zfsacl.c
/usr/ports/net/samba32/work/samba-3.2.13/source/modules/vfs_zfsacl.c
/usr/ports/net/samba33/work/samba-3.3.6/source/modules/vfs_zfsacl.c
Опции сборки такие:
Код: Выделить всё
newfs:/root@[14:05]# cat /var/db/ports/samba33/options | grep "WITH_"
WITH_LDAP=true
WITH_ADS=true
WITH_WINBIND=true
WITH_ACL_SUPPORT=true
WITH_AIO_SUPPORT=true
WITH_FAM_SUPPORT=true
WITH_SYSLOG=true
WITH_QUOTAS=true
WITH_EXP_MODULES=true
WITH_POPT=true
В каталоге /usr/local/lib/samba/vfs/ модуля zfsacl.so упорно нет:
Код: Выделить всё
newfs:/usr/local/lib/samba/vfs@[14:06]# ls
acl_tdb.so* cap.so* extd_audit.so* preopen.so* shadow_copy2.so* xattr_tdb.so*
acl_xattr.so* catia.so* fake_perms.so* readahead.so* smb_traffic_analyzer.so*
aio_fork.so* commit.so* full_audit.so* readonly.so* streams_depot.so*
audit.so* default_quota.so* netatalk.so* recycle.so* streams_xattr.so*
cacheprime.so* expand_msdfs.so* notify_fam.so* shadow_copy.so* syncops.so*
Читал man на acl_tdb и acl_xattr - про ZFS ни словечка....
PS: Хочу перевести корпоративный файловый сервер на ZFS - НО жесткое требование - наличие ACL.
Система: FreeBSD 8.0-BETA2, AMD64
Ссылки по теме:
http://www.nineproductions.com/technolo ... alkthrough
http://www.edplese.com/samba-with-zfs.html
По последней ссылке в самом конце:
Support for ZFS ACLs was slated to be included in version 3.0.26 the source releases of Samba but the release ended up being a security fix release. The next major Samba release will be 3.2.0 which will include integration of ZFS ACLs.
Despite the lack of ZFS ACL support in the source release of Samba, ZFS ACLs still work nicely with Samba. By design Samba performs fileo operations in the context of the user so that any existing access controls on the files apply regardless of Samba support for them.
В самой FreeBSD ZFS ACL вроде как есть:
http://www.opennet.ru/opennews/art.shtml?num=22319
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 12:27:44
Dorlas
Сейчас пробую собрать руками последний samba-3.3.7.tar.gz.
Опции сборки:
Код: Выделить всё
./configure --with-acl-support --with-ldap --with-ads --with-idmap --with-shared-modules=idmap_rid,vfs_zfsacl --with-included-popt
Сборка прерывается вот на таком:
Код: Выделить всё
...Compiling modules/vfs_zfsacl.c
modules/vfs_zfsacl.c: In function 'zfs_get_nt_acl_common':
modules/vfs_zfsacl.c:42: error: 'ace_t' undeclared (first use in this function)
modules/vfs_zfsacl.c:42: error: (Each undeclared identifier is reported only once
modules/vfs_zfsacl.c:42: error: for each function it appears in.)
modules/vfs_zfsacl.c:42: error: 'acebuf' undeclared (first use in this function)
modules/vfs_zfsacl.c:47: error: 'ACE_GETACLCNT' undeclared (first use in this function)
modules/vfs_zfsacl.c:60: error: expected expression before ')' token
modules/vfs_zfsacl.c:65: error: 'ACE_GETACL' undeclared (first use in this function)
modules/vfs_zfsacl.c:82: error: 'ACE_OWNER' undeclared (first use in this function)
modules/vfs_zfsacl.c:85: error: 'ACE_GROUP' undeclared (first use in this function)
modules/vfs_zfsacl.c:88: error: 'ACE_EVERYONE' undeclared (first use in this function)
modules/vfs_zfsacl.c: In function 'zfs_process_smbacl':
modules/vfs_zfsacl.c:106: error: 'ace_t' undeclared (first use in this function)
modules/vfs_zfsacl.c:106: error: 'acebuf' undeclared (first use in this function)
modules/vfs_zfsacl.c:112: error: expected expression before ')' token
modules/vfs_zfsacl.c:130: error: 'ACE_EVERYONE' undeclared (first use in this function)
modules/vfs_zfsacl.c:133: error: 'ACE_OWNER' undeclared (first use in this function)
modules/vfs_zfsacl.c:136: error: 'ACE_GROUP' undeclared (first use in this function)
modules/vfs_zfsacl.c:148: error: 'ACE_SETACL' undeclared (first use in this function)
The following command failed:
gcc -I. -I/usr/home/air-admin/samba-3.3.7/source -O -O -D_SAMBA_BUILD_=3 -I/usr/home/air-admin/samba-3.3.7/source/popt -I/usr/home/air-admin/samba-3.3.7/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/usr/local/include -DLDAP_DEPRECATED -I/include -I/usr/home/air-admin/samba-3.3.7/source/lib -D_SAMBA_BUILD_=3 -fPIC -DPIC -c modules/vfs_zfsacl.c -o modules/vfs_zfsacl.o
*** Error code 1
Stop in /usr/home/air-admin/samba-3.3.7/source.
Все - не судьба пока ???
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 12:37:00
Dorlas
Пробую найти такие функции в /usr/src:
Код: Выделить всё
newfs:/usr/src@[15:29]# grep -R -i "ACE_SETACL" *
sys/cddl/contrib/opensolaris/uts/common/sys/acl.h:#define ACE_SETACL 5
newfs:/usr/src@[15:32]# grep -R -i "ACE_GETACL" *
sys/cddl/contrib/opensolaris/uts/common/sys/acl.h:#define ACE_GETACL 4
sys/cddl/contrib/opensolaris/uts/common/sys/acl.h:#define ACE_GETACLCNT 6
Похоже что нужно этот acl.h файл как то указать компилятору...только знать бы, как

Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 14:41:44
paradox
спишись с тем кто этот порт в бсд прикручивал
может он поправит его
пути в конфигуре нужно указывать на файлы
что бы оно его нашло
ну и отчеты конфигуре читать где оно эти файлы пытаеться искать
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 15:08:39
Dorlas
ОК - спишусь
Я пробовал подложить acl.h в папку include - было вот такое:
Код: Выделить всё
include/acl.h:52: error: expected specifier-qualifier-list before 'o_mode_t'
include/acl.h:63: error: conflicting types for 'acl_t'
/usr/include/sys/acl.h:146: error: previous declaration of 'acl_t' was here
include/acl.h:282: error: conflicting types for 'acl_free'
/usr/include/sys/acl.h:367: error: previous declaration of 'acl_free' was here
...
И еще много других варнингов
Далее редактировал acl.h в include и убирал то, на что ругалось.
В какой-то момент объектный файл у меня собрался - ну я на радостях make all, и скопировал полученный zfsacl.so в /usr/local/lib/samba/vfs
Но ну тут-то было - при попытке его использования в шаре в момент работы с шарой появляются ошибки:
Код: Выделить всё
192.168.0.9 (192.168.0.9) connect to service D initially as user AIR-SOFT\egor (uid=10000, gid=10011) (pid 2422)
/libexec/ld-elf.so.1: /usr/local/lib/samba/vfs/zfsacl.so: Undefined symbol "acl"
[2009/07/30 18:06:28, 1] smbd/service.c:make_connection_snum(1115)
192.168.0.9 (192.168.0.9) connect to service D initially as user AIR-SOFT\egor (uid=10000, gid=10011) (pid 2424)
/libexec/ld-elf.so.1: /usr/local/lib/samba/vfs/zfsacl.so: Undefined symbol "acl"
Короче - сыро - бум стучать разработчиков

Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 15:35:10
Dorlas
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 15:40:42
paradox
в самбу лишнее
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-07-30 15:41:38
Dorlas
Я уже понял:
So then it looks like FreeBSD created their own variant of the zfs ACL API.
Brilliant. I really wonder why this is a Samba bug.
Feel free to provide a patch to make this work.
Thanks,
Volker

Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-09-03 7:02:56
Dorlas
Вообще прикольно написано про NFS ACLv4 у разработчиков FreeBSD:
Instead of adding support for the new API to Samba and possibly other software, I decided to write a wrapper that implements SunOS-compatible API (acl(3)/facl(3)) using FreeBSD system calls. Port can be found here:
http://people.freebsd.org/~trasz/libsunacl.shar. Porting should be simple - in application you want to make work, change "<sys/acl.h>" into "<sunacl.h>"; then link with libsunacl.
Скорей бы 8-ка вышла, чтобы разморозили код и внесли изменения в 8.x:
Current state
Libc and some of the kernel changes were already committed into HEAD. Userland utilities, kernel support for ZFS and regression tests will hit the tree when the code freeze is over, and will probably appear in FreeBSD 8.1. Changes required for NFSv4 ACLs support in UFS are quite invasive and need to be reviewed carefully.
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-09-09 0:08:42
Dorlas
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-09-09 0:14:33
paradox
так а чего еще не хватает?
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-09-09 4:10:19
Dorlas
Времени конечно же

Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-12-14 20:04:46
Larin
ну, что? реализовали хоть в каком-то рабочем виде zfs acl?
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-12-15 19:52:38
Larin
блин. поставил куррент.
setfacl/getfacl работают. самба нет))
тут есть порт враппер для acl
пытаюсь скомпилировать, но не собирается
Код: Выделить всё
# make
===> Building for libsunacl-1.0
cc -O2 -pipe -fno-strict-aliasing -Wall -pedantic -o libsunacl.so.0 -shared libsunacl.c acl_compat.c
In file included from libsunacl.c:33:
acl_compat.h:31: warning: 'struct acl' declared inside parameter list
acl_compat.h:31: warning: its scope is only this definition or declaration, which is probably not what you want
acl_compat.h:32: warning: 'struct acl' declared inside parameter list
libsunacl.c: In function 'xacl':
libsunacl.c:55: warning: dereferencing 'void *' pointer
libsunacl.c:55: error: request for member 'ats_acl' in something not a structure or union
libsunacl.c:90: warning: dereferencing 'void *' pointer
libsunacl.c:90: error: request for member 'ats_acl' in something not a structure or union
libsunacl.c:95: warning: dereferencing 'void *' pointer
libsunacl.c:95: error: request for member 'ats_acl' in something not a structure or union
libsunacl.c:115: warning: dereferencing 'void *' pointer
libsunacl.c:115: error: request for member 'ats_acl' in something not a structure or union
In file included from acl_compat.c:35:
acl_compat.h:31: warning: 'struct acl' declared inside parameter list
acl_compat.h:31: warning: its scope is only this definition or declaration, which is probably not what you want
acl_compat.h:32: warning: 'struct acl' declared inside parameter list
acl_compat.c:60: error: 'ACL_ENTRY_LIMIT_INHERIT' undeclared here (not in a function)
acl_compat.c:61: error: 'ACL_ENTRY_ONLY_INHERIT' undeclared here (not in a function)
acl_compat.c:89: warning: 'struct acl' declared inside parameter list
acl_compat.c:90: error: conflicting types for 'acl_from_aces'
acl_compat.h:32: error: previous declaration of 'acl_from_aces' was here
acl_compat.c: In function 'acl_from_aces':
acl_compat.c:95: error: dereferencing pointer to incomplete type
acl_compat.c:95: warning: passing argument 2 of 'bzero' makes integer from pointer without a cast
acl_compat.c:97: error: dereferencing pointer to incomplete type
acl_compat.c:97: error: request for member 'acl_cnt' in something not a structure or union
acl_compat.c:97: warning: statement with no effect
acl_compat.c:98: error: dereferencing pointer to incomplete type
acl_compat.c:98: error: request for member 'acl_magic' in something not a structure or union
acl_compat.c:98: error: 'ACL_MAGIC' undeclared (first use in this function)
acl_compat.c:98: error: (Each undeclared identifier is reported only once
acl_compat.c:98: error: for each function it appears in.)
acl_compat.c:98: warning: statement with no effect
acl_compat.c:101: error: dereferencing pointer to incomplete type
acl_compat.c:101: error: request for member 'acl_entry' in something not a structure or union
acl_compat.c:101: warning: assignment from incompatible pointer type
acl_compat.c:104: error: dereferencing pointer to incomplete type
acl_compat.c:104: error: request for member 'ae_id' in something not a structure or union
acl_compat.c:104: warning: statement with no effect
acl_compat.c:107: error: dereferencing pointer to incomplete type
acl_compat.c:107: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:107: warning: statement with no effect
acl_compat.c:109: error: dereferencing pointer to incomplete type
acl_compat.c:109: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:109: warning: statement with no effect
acl_compat.c:111: error: dereferencing pointer to incomplete type
acl_compat.c:111: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:111: warning: statement with no effect
acl_compat.c:113: error: dereferencing pointer to incomplete type
acl_compat.c:113: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:113: warning: statement with no effect
acl_compat.c:115: error: dereferencing pointer to incomplete type
acl_compat.c:115: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:115: warning: statement with no effect
acl_compat.c:117: error: dereferencing pointer to incomplete type
acl_compat.c:117: error: request for member 'ae_perm' in something not a structure or union
acl_compat.c:117: warning: passing argument 1 of '_bsd_from_sun' from incompatible pointer type
acl_compat.c:118: error: dereferencing pointer to incomplete type
acl_compat.c:118: error: request for member 'ae_flags' in something not a structure or union
acl_compat.c:118: warning: passing argument 1 of '_bsd_from_sun' from incompatible pointer type
acl_compat.c:122: error: dereferencing pointer to incomplete type
acl_compat.c:122: error: request for member 'ae_extended' in something not a structure or union
acl_compat.c:122: error: 'ACL_EXTENDED_ALLOW' undeclared (first use in this function)
acl_compat.c:122: warning: statement with no effect
acl_compat.c:125: error: dereferencing pointer to incomplete type
acl_compat.c:125: error: request for member 'ae_extended' in something not a structure or union
acl_compat.c:125: error: 'ACL_EXTENDED_DENY' undeclared (first use in this function)
acl_compat.c:125: warning: statement with no effect
acl_compat.c:128: error: dereferencing pointer to incomplete type
acl_compat.c:128: error: request for member 'ae_extended' in something not a structure or union
acl_compat.c:128: error: 'ACL_EXTENDED_AUDIT' undeclared (first use in this function)
acl_compat.c:128: warning: statement with no effect
acl_compat.c:131: error: dereferencing pointer to incomplete type
acl_compat.c:131: error: request for member 'ae_extended' in something not a structure or union
acl_compat.c:131: error: 'ACL_EXTENDED_ALARM' undeclared (first use in this function)
acl_compat.c:131: warning: statement with no effect
acl_compat.c: At top level:
acl_compat.c:143: warning: 'struct acl' declared inside parameter list
acl_compat.c:144: error: conflicting types for 'aces_from_acl'
acl_compat.h:31: error: previous declaration of 'aces_from_acl' was here
acl_compat.c: In function 'aces_from_acl':
acl_compat.c:150: error: dereferencing pointer to incomplete type
acl_compat.c:150: error: request for member 'acl_cnt' in something not a structure or union
acl_compat.c:150: error: invalid operands to binary *
acl_compat.c:150: warning: passing argument 2 of 'bzero' makes integer from pointer without a cast
acl_compat.c:152: error: dereferencing pointer to incomplete type
acl_compat.c:152: error: request for member 'acl_cnt' in something not a structure or union
acl_compat.c:152: warning: assignment makes integer from pointer without a cast
acl_compat.c:154: error: dereferencing pointer to incomplete type
acl_compat.c:154: error: request for member 'acl_cnt' in something not a structure or union
acl_compat.c:154: warning: comparison between pointer and integer
acl_compat.c:155: error: dereferencing pointer to incomplete type
acl_compat.c:155: error: request for member 'acl_entry' in something not a structure or union
acl_compat.c:155: warning: assignment from incompatible pointer type
acl_compat.c:158: error: dereferencing pointer to incomplete type
acl_compat.c:158: error: request for member 'ae_id' in something not a structure or union
acl_compat.c:158: warning: assignment makes integer from pointer without a cast
acl_compat.c:160: error: dereferencing pointer to incomplete type
acl_compat.c:160: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:160: warning: comparison between pointer and integer
acl_compat.c:162: error: dereferencing pointer to incomplete type
acl_compat.c:162: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:162: warning: comparison between pointer and integer
acl_compat.c:164: error: dereferencing pointer to incomplete type
acl_compat.c:164: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:164: warning: comparison between pointer and integer
acl_compat.c:166: error: dereferencing pointer to incomplete type
acl_compat.c:166: error: request for member 'ae_tag' in something not a structure or union
acl_compat.c:166: warning: comparison between pointer and integer
acl_compat.c:171: error: dereferencing pointer to incomplete type
acl_compat.c:171: error: request for member 'ae_perm' in something not a structure or union
acl_compat.c:171: warning: passing argument 2 of '_sun_from_bsd' makes integer from pointer without a cast
acl_compat.c:172: error: dereferencing pointer to incomplete type
acl_compat.c:172: error: request for member 'ae_flags' in something not a structure or union
acl_compat.c:172: warning: passing argument 2 of '_sun_from_bsd' makes integer from pointer without a cast
acl_compat.c:176: error: dereferencing pointer to incomplete type
acl_compat.c:176: error: request for member 'ae_extended' in something not a structure or union
acl_compat.c:177: error: 'ACL_EXTENDED_ALLOW' undeclared (first use in this function)
acl_compat.c:180: error: 'ACL_EXTENDED_DENY' undeclared (first use in this function)
acl_compat.c:183: error: 'ACL_EXTENDED_ALARM' undeclared (first use in this function)
acl_compat.c:186: error: 'ACL_EXTENDED_AUDIT' undeclared (first use in this function)
acl_compat.c:190: error: dereferencing pointer to incomplete type
acl_compat.c:190: error: request for member 'ae_extended' in something not a structure or union
acl_compat.c:190: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'struct artwo *'
*** Error code 1
Stop in /usr/home/larin/libsunacl/work/libsunacl-1.0.
*** Error code 1
Stop in /usr/home/larin/libsunacl.
у кого-нибудь работает?
http://wiki.freebsd.org/NFSv4_ACLs
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2009-12-16 14:31:34
Larin
отписался разрабу.
говорит, что в данный момент пилит враппер.
обещал сегодня выложить рабочий враппер.
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-03-10 13:48:46
-=HaRius=-
у кого-нибудь это все завелось на 8.0 ???
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-05-26 10:22:13
dvg_lab
Озадачен той же проблемой, на днях буду пытаться собрать такой вот компот 8-STABLE, zfs v14, libsunacl + samba, правда даже если заработает, в продакшен такое выпускать страшновато. Второй вариант тупо взять OpenSolaris правда опыта работы с ней фактически ноль.
Никто из комрадов так и не отписался, победили в итоге или нет?
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-10-21 16:40:37
gabell
Установил с libsunacl, как описано
здесь. Столкнулся с похожими проблемами, как и в том топике. Сейчас разбираюсь. Может у кого-нибудь есть рабочие конфиги? Или какая-нибудь информация по этому вопросу?
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-10-21 17:34:45
dvg_lab
Я так и не победил до конца, у меня оно заработало ACL как-то раздаются, но беда с наследованием жуткая, не понятно вообще как оно там работает. В итоге забил переключился на другие проекты, а этот думаю сделать так - снести ZFS к чертям, поставить стандартный UFS2 и на нем все завести. Оно по крайней мере работает на research уже ни времени ни желания нет. Да и очень меня как-то напрягает при апдгрейдах самбы еще думать про кучу патчей/возможных глюков и тд. Не стабильно оно еще сыро и тд. Имхо в продакшен ему рано. А дома на файломойке влом разбираться честно..
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-10-22 12:20:24
gabell
Чем больше экспериментирую, тем больше меня посещают похожие мысли. Тоже не могу разобраться с наследованием.
У меня большое хранилище: 3 пула по 11 Тб. Читал, что были
ограничения в инструментах для работы с дисками во FreeBSD. Какая сейчас ситуация? Подходит ли UFS2 для больших хранилищ?
Пока думаю отключить возможность править из самбы и редактировать руками ACL.
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-10-22 14:22:05
gonzo111
aclinherit=discard | noallow | restricted | passthrough
aclmode=discard | groupmask | passthrough
http://www.freebsd.org/cgi/man.cgi?quer ... ormat=html
пробовали менять?
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-10-22 23:21:53
Alex Keda
gabell писал(а):Чем больше экспериментирую, тем больше меня посещают похожие мысли. Тоже не могу разобраться с наследованием.
У меня большое хранилище: 3 пула по 11 Тб. Читал, что были
ограничения в инструментах для работы с дисками во FreeBSD. Какая сейчас ситуация? Подходит ли UFS2 для больших хранилищ?
Пока думаю отключить возможность править из самбы и редактировать руками ACL.
у меня гопота+UFS2 живёт на cтораджах по 6.6T
нормально всё.
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2010-10-25 14:50:40
gabell
Сразу установил в passthrough. Другие варианты не пробовал. Но мне и нужно, чтобы права наследовались от родительского каталога.
Alex Keda писал(а):
у меня гопота+UFS2 живёт на cтораджах по 6.6T нормально всё.
Спасибо за информацию.
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2011-04-26 10:23:36
f0s
народ, кому-нить таки удалось на фрибсд8, сделать чтобы самба ACL понимала. массив zfs
Re: Разыскивается zfsacl.so в Samba
Добавлено: 2011-04-26 20:21:32
GhOsT_MZ
Присоединяюсь к вопросу. Сейчас заинтересовался ZFS, посмотрев сравнительные тесты с UFS2... Вот если еще и самба с ACL заработают, то возможно выбор падет именно на ZFS.