View Issue Details

IDProjectCategoryView StatusLast Update
0005034JEDI Code LibraryJclSysInfopublic2009-12-08 22:29
ReporterHeikoAdamsAssigned Tooutchy 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformDesktop WorkstationOSWindows 7OS Version
Product VersionVersion 2.1 
Target VersionFixed in VersionVersion 2.2 
Summary0005034: Result of GetDomainName is not reliable
DescriptionThe result of GetDomainName is not reliable if the current username is used on domain- and local-user-account. In this case it is possible that GetDomainName return the workstation-name as domain-name.
Additional InformationI've attached a modified version of JclSysInfo.pas in which GetDomainName no longer calls GetUserDomainName but calls LookupAccountSid. My modifications are marked with "//091123 HA"
TagsJcl, JclSysInfo
Fixed in GIT commit
Fixed in SVN revision3088
IDE versionBDS 2006

Relationships

parent of 0005092 resolvedoutchy GetDomainName returns local computer name in workgroup 

Activities

2009-11-23 14:13

 

JclSysInfo.pas (202,498 bytes)

outchy

2009-11-23 20:43

administrator   ~0016899

(posted by the reporter in the JCL newsgroups)

I've found a solution on google groups[1] which uses LookupAccountSID and seems to work fine.

[1] http://www.google.com/url?url=http://groups.google.de/g/e1a7fef6/t/5a51c6cbf2dd97d3/d/25f699351222a88e%3Fhl%3Dde%26ie%3DUTF-8%26oe%3Dutf-8%26q%3Ddelphi%2BLookupAccountSid%2325f699351222a88e&ei=uIMKS_e6AongQv7V5eIC&sa=t&ct=res&cd=3&source=groups&usg=AFQjCNHbRfIcRAogA_mlMlYxjuA8ew1G-w

outchy

2009-11-25 22:49

administrator   ~0016909

Your patch is applied in revision 3088. Thanks for you help.

HeikoAdams

2009-11-26 10:11

reporter   ~0016912

The Patch works fine in my apps since 2009-11-23 and I didn't get any negative feedback yet.

Issue History

Date Modified Username Field Change
2009-11-23 14:13 HeikoAdams New Issue
2009-11-23 14:13 HeikoAdams File Added: JclSysInfo.pas
2009-11-23 14:13 HeikoAdams IDE version => BDS 2006
2009-11-23 14:13 HeikoAdams Tag Attached: Jcl
2009-11-23 14:13 HeikoAdams Tag Attached: JclSysInfo
2009-11-23 20:43 outchy Note Added: 0016899
2009-11-25 22:49 outchy Note Added: 0016909
2009-11-25 22:49 outchy Assigned To => outchy
2009-11-25 22:49 outchy Status new => feedback
2009-11-26 10:11 HeikoAdams Note Added: 0016912
2009-12-08 22:29 outchy Fixed in revision => 3088
2009-12-08 22:29 outchy Status feedback => resolved
2009-12-08 22:29 outchy Fixed in Version => Version 2.2 (Subversion repository/Daily zips)
2009-12-08 22:29 outchy Resolution open => fixed
2010-01-06 14:40 outchy Relationship added parent of 0005092