Bug #3182

Error during add/remove system users from a group

Added by Davide Marini about 6 years ago. Updated about 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-mail-server
Target version:v6.6
Security class: Resolution:
Affected version:v6.6-final NEEDINFO:No

Description

When adding (removing) a user to (from) a group the web interface shows an error, this is the log:

May 22 18:19:58 freenas /sbin/e-smith/db[326]: /var/lib/nethserver/db/accounts: OLD gruppotest_nethesis=group|Description|test group|Gid|5115|MailStatus|disabled|Members|zznethesistest1,zznethesistest2,zznethesistest3
May 22 18:19:58 freenas /sbin/e-smith/db[326]: /var/lib/nethserver/db/accounts: NEW gruppotest_nethesis=group|Description|test group|Gid|5115|MailStatus|disabled|Members|zznethesistest1,zznethesistest2
May 22 18:19:58 freenas esmith::event[329]: Event: group-modify gruppotest_nethesis
May 22 18:19:58 freenas esmith::event[329]: expanding /etc/postfix/internal_access
May 22 18:19:58 freenas esmith::event[329]: expanding /etc/postfix/vmailbox
May 22 18:19:58 freenas esmith::event[329]: expanding /etc/postfix/aliases
May 22 18:19:58 freenas esmith::event[329]: expanding /etc/postfix/virtual
May 22 18:19:58 freenas esmith::event[329]: expanding /var/www/html/faxweb/conf.inc.php
May 22 18:19:58 freenas esmith::event[329]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.208153]
May 22 18:19:58 freenas esmith::event[329]: doveadm(zznethesistest2): Fatal: User doesn't exist
May 22 18:19:58 freenas esmith::event[329]: doveadm(zznethesistest3): Fatal: User doesn't exist
May 22 18:19:58 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S14nethserver-mail-group-change-subscriptions FAILED: 1 [0.085962]
May 22 18:19:58 freenas esmith::event[329]: Use of uninitialized value in numeric gt (>) at /usr/share/perl5/vendor_perl/Authen/SASL/Perl.pm line 130.
May 22 18:19:59 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S15group-modify-unix SUCCESS [0.294623]
May 22 18:19:59 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S30nethserver-mail-account-update SUCCESS [0.148524]
May 22 18:20:00 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S30nethserver-mail-postmap-update SUCCESS [0.751938]
May 22 18:20:00 freenas esmith::event[329]: Updated comment of group FREENAS\gruppotest_nethesis to test group
May 22 18:20:00 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S30nethserver-samba-group-sync SUCCESS [0.919369]
May 22 18:20:01 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S95nethserver-mail-group-acl-adjust SUCCESS [0.068391]
May 22 18:20:01 freenas esmith::event[329]: Action: /etc/e-smith/events/group-modify/S95nethserver-samba-smbd-adjust SUCCESS [0.063807]
May 22 18:20:01 freenas esmith::event[329]: Event: group-modify FAILED
May 22 18:20:01 freenas httpd-admin: [ERROR] Nethgui\System\NethPlatform: process on queue `post-process` exited with code 1: /usr/libexec/nethserver/ptrack  -j -s '/var/run/ptrack/c8337ce0e168dbea8c87e9782d98dd27.sock' -d '/var/spool/ptrack/64abc013983dbbd8.dump'  -- /usr/bin/sudo -n /sbin/e-smith/signal-event 'group-modify' 'gruppotest_nethesis'
May 22 18:22:16 freenas httpd-admin: [NOTICE] Nethgui\Module\Logout: user admin logged out


The problem is caused by system users configuration, in effect the users have no mail checked in their own "services" tab and this seems to cause the:
Action: /etc/e-smith/events/group-modify/S14nethserver-mail-group-change-subscriptions FAILED

The problem doesn't occur if users have their own mail box checked.
Anyway it doesn't seems to affect other user's features/permissions.

Associated revisions

Revision 18357156
Added by Davide Principi about 6 years ago

Ignore return value from MailServer::changeGroupSubscriptions(). Refs #3182

The changeGroupSubscriptions() method attempts to unsubscribe also
disabled mail accounts. I'd keep this behaviour because in the future
the "mail enabled" state must be separate from "group shared folders
subscription".

E.g.:

It may happen that a user subscribed a shared folder, and has now
mail disabled. If the user is removed from the group it must
unsubscribe the shared folder.

History

#1 Updated by Filippo Carletti about 6 years ago

  • Status changed from NEW to TRIAGED
  • Target version set to v6.6
  • % Done changed from 0 to 20

#2 Updated by Davide Principi about 6 years ago

  • Category set to nethserver-mail-server
  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30
  • Affected version set to v6.6-final

#3 Updated by Davide Principi about 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

MODIFIED

#4 Updated by Davide Principi about 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-mail-server-1.8.9-1.1.g1835715.ns6.noarch.rpm

#5 Updated by dz0 0te about 6 years ago

  • Assignee set to dz0 0te

#6 Updated by dz0 0te about 6 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (dz0 0te)
  • % Done changed from 70 to 90

System and Package Version installed
VM KVM - Clean install of Nethserver 6.6 fully updated
Package Installed: nethserver-mail-server-1.8.9-1.ns6.noarch
Other Package installed: Email,File server,MySQL server,POP3 connector,Web server

Test Original Problem
Created one group, 2 user with email and 3 without.
Confirmed the error in the log file when add/del user without email from group

Install Updated Package

yum --enablerepo=nethserver-testing update nethserver-mail-server-1.8.9-1.1.g1835715.ns6

Test Results after update
Adding/Removing users (with or without email) from Group works correctly without errors in the log.

Jun 12 07:01:42 localhost esmith::event[3774]: Action: /etc/e-smith/events/group-modify/S30nethserver-samba-group-sync SUCCESS [0.177152]
Jun 12 07:01:42 localhost esmith::event[3774]: Action: /etc/e-smith/events/group-modify/S95nethserver-fetchmail-condrestart SUCCESS [0.052535]
Jun 12 07:01:42 localhost esmith::event[3774]: Action: /etc/e-smith/events/group-modify/S95nethserver-mail-group-acl-adjust SUCCESS [0.063921]
Jun 12 07:01:42 localhost esmith::event[3774]: Action: /etc/e-smith/events/group-modify/S95nethserver-samba-smbd-adjust SUCCESS [0.0617]
Jun 12 07:01:42 localhost esmith::event[3774]: Event: group-modify SUCCESS

Note
...

#7 Updated by Davide Principi about 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

In nethserver-updates:
nethserver-mail-server-1.9.0-1.ns6.noarch.rpm

Also available in: Atom PDF