A BUGNOTE has been added to this bug.
======================================================================
http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0000118
======================================================================
Reported By:                seanc
Assigned To:                
======================================================================
Project:                    DBMail
Bug ID:                     118
Category:                   Command-Line programs (dbmail-users, dbmail-util)
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             15-Nov-04 10:55 CET
Last Modified:              15-Nov-04 12:11 CET
======================================================================
Summary:                    dbmail-users -c [EMAIL PROTECTED] -W
Description: 
The -W flag to dbmail-users doesn't work.
======================================================================

----------------------------------------------------------------------
 aaron - 15-Nov-04 11:58 CET 
----------------------------------------------------------------------
Try the arguments in reverse. Let me know if that fixes it.

If it does, apply the patch and let me know if that fixes it, too.

If both are true, it's a subtle and stupid FreeBSD extension to POSIX
getopt.

----------------------------------------------------------------------
 seanc - 15-Nov-04 12:11 CET 
----------------------------------------------------------------------
Reversing the options results in an error:

% dbmail-users -a [EMAIL PROTECTED] -W
Opening connection to database...
Opening connection to authentication...
Ok. Connected
Adding user [EMAIL PROTECTED] with password type ,0 bytes mailbox limit and
clientid 0... Ok, user added id [9]
Adding INBOX for new user
Ok. added
Done
% dbmail-users -c [EMAIL PROTECTED] -W
Opening connection to database...
Opening connection to authentication...
Ok. Connected
Performing changes for user [EMAIL PROTECTED]
Done
% dbmail-users -Wc [EMAIL PROTECTED] -W
*** dbmail-users ***
Use this program to manage your DBMail users.
See the man page for more info. Modes of operation:

     -a user   add a user
     -d user   delete a user
     -c user   change details for a user
     -e user   empty all mailboxes for a user
     -l uspec  list information for matching users
     -x alias  create an external forwarding address

Summary of options for all modes:
     -w passwd specify user's password on the command line
     -W [file] read from a file or prompt for a user's password
     -p pwtype password type may be one of the following:
               plaintext, crypt, md5-hash, md5-digest,
               crypt-raw, md5-hash-raw, md5-digest-raw
     -P [file] pull encrypted password from the shadow file
     -u user   new username (only useful for -c, change)
     -g client assign the user to a client
     -m max    set the maximum mail quota in <bytes>B,
               <kbytes>K, or <mbytes>M, default in bytes
               specify 0 to remove any mail quota limits
     -s alia.. adds a list of recipient aliases
     -S alia.. removes a list of recipient aliases (wildcards supported)
     -t fwds.. adds a list of deliver-to forwards
     -T fwds.. removes a list of deliver-to forwards (wildcards
supported)

Common options for all DBMail utilities:
     -f file   specify an alternative config file
     -q        quietly skip interactive prompts
               use twice to suppress error messages
     -v        verbose details
     -V        show the version
     -h        show this help message
Exit 1
% dbmail-users -cW [EMAIL PROTECTED] -W
Opening connection to database...
Opening connection to authentication...
Ok. Connected
Error: user [W] does not exist.
Command failed.
Exit 255
% dbmail-users -cW [EMAIL PROTECTED]
Opening connection to database...
Opening connection to authentication...
Ok. Connected
Error: user [W] does not exist.
Command failed.

I tried futzing with getopt()'s format and removing the double colons and
replacing it with single colons, as well as applying the patch: none of
the above worked.  The differences between glibc and BSD's getopt()
wouldn't change the outcome of this.

Bug History
Date Modified  Username       Field                    Change              
======================================================================
15-Nov-04 10:55seanc          New Bug                                      
15-Nov-04 11:58aaron          Bugnote Added: 0000352                       
15-Nov-04 11:59aaron          File Added: user-reset.diff                    
15-Nov-04 12:11seanc          Bugnote Added: 0000353                       
======================================================================

Reply via email to