Bug 2725 - can't execute escape_ldap_string_alloc until after argc check
Summary: can't execute escape_ldap_string_alloc until after argc check
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: net utility (show other bugs)
Version: 3.0.14a
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Jim McDonough
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-18 13:14 UTC by John Antonishek
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Antonishek 2005-05-18 13:14:30 UTC
In utils/net_ads.c, ads_user_info(): the function call to initialize
'escaped_user' needs to be moved to after the "if (argc < 1)" check.  If you
don't, the following statement causes a segmentation violation since the
resulting call is: escape_ldap_string_alloc(0) (because no user was inputed). 
You want to print a usage message in this case.

statement:
"net user INFO"

-John
Comment 1 Volker Lendecke 2005-05-19 03:52:52 UTC
Fixed with Revision 6900. Thanks!

Volker
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:16:38 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.