summaryrefslogtreecommitdiff
path: root/src/sm_genid.c
AgeCommit message (Collapse)Author
2015-10-20Get rid of strcpy() in the HAVE_UUID_CREATE caseMatthieu Herrb
Even though this use was safe, some linkers produce a warning when strcpy() is used, and this is the only use in libSM. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-10-20Fix uuid_to_string(3) typeMatthieu Herrb
It should be char *. Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-04-10Include unistd.h for getpid()Jon TURNEY
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: David Macek <david.macek.0@gmail.com>
2013-08-09Fix some clang warnings about integer size/sign conversionsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-26Remove unused TLI ("STREAMSCONN") code from libSMAlan Coopersmith
Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. All known platforms with TLI/XTI support that X11R7 & later releases run on also have (and mostly prefer) BSD socket support for their networking API. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-09unifdef -ULynxAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-12-09Replace malloc(strlen) + strcpy sets with strdup callsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-12-09Reindent IPv4 code to match IPv6 codeAlan Coopersmith
Takes care of the other block of code confusingly sharing indent levels Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-12-09Move variable declarations to get rid of unnecessary scope bracketsAlan Coopersmith
Gets rid of one of the multiple levels of bracketing that confusingly shared the same indent level. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-12-09Move and rename temp[4] definition to reduce confusion with temp[256]Alan Coopersmith
Both variables were locals in different scope levels of the same function, leading to both confusing code and gcc -Wshadow warnings: sm_genid.c: In function 'SmsGenerateClientID': sm_genid.c:160:10: warning: declaration of 'temp' shadows a previous local Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-12-09Use imdent to make multiple levels of nested #if easier to followAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-09-16Strip trailing whitespaceAlan Coopersmith
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-21Sun's copyrights belong to Oracle nowAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-05-26Fix off by one error in SmsGenerateClientID when uuid_create is usedAlexander Kabaev
Fix apparent typo in SmsGenerateClientID which always leaves the first byte of allocated id string uninitialized. If that byte happens to be 0, SmsGenerateClientId appears to return an empty string to the caller, instead of proper GUID in text form. Reviewed-by: James CLoos <cloos@jhcloos.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-01-14Update Sun license notices to current X.Org standard formAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-08-03Use FreeBSD uuid functions when available.Diego Elio 'Flameeyes' Pettenò
If the system provide the uuid_create function assume building on FreeBSD or another OS with a compatible uuid interface. If that's the case, ignore libuuid and just use the system functions without extra deps.
2009-01-28Janitor: ansification, make distcheck, compiler warnings.Paulo Cesar Pereira de Andrade
2008-06-24Bug #14949: Don't use gethostbyname() for client IDs.Dan Williams
gethostbyname() will hit the network, which leads to DNS timeouts, which leads to fail. Just use UUIDs.
2007-05-13Sanitized hex string conversion in SmsGenerateClientID().Tilman Sauerbeck
This reduces the size of the DSO by almost 4K and gets rid of 255 relocations on load.
2006-06-26From Patch #6046 <https://bugs.freedesktop.org/attachment.cgi?id=6046>Alan Coopersmith
freeaddrinfo() in error handling return (Peter Breitenlohner)
2005-05-17- Conditionally include config.h in xc/lib/SMXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_10Søren Sandmann Pedersen
- Add libSM to symlink.sh - Add SM build system
2004-05-24Fix build glitches when building modules independently using Imake.XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1COMPOSITEWRAPEgbert Eich
2004-04-23Merging XORG-CURRENT into trunkXACE-SELINUX-MERGEEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2004-01-29Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004xf86-4_3_99_903_specialxf86-012804-2330Egbert Eich
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16Kaleb Keithley
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley
2003-11-14R6.6 is the Xorg base-lineXORG-MAINXORG-STABLEKaleb Keithley