1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtcm: Coverity 89265

This commit is contained in:
Peter Howkins 2018-07-04 01:26:39 +01:00
parent 3b85e48a68
commit 4ee5f3d3cf

View file

@ -327,14 +327,11 @@ lock_it(void)
locker.l_len = 0;
#endif /* SVR4 */
strcpy (buff, dir);
strcat (buff, "/.lock.");
/*
* /var/spool might be mounted. Use .lock.hostname to
* prevent more than one cms running in each host.
*/
strcat(buff, _DtCmGetLocalHost());
snprintf(buff, sizeof(buff), "%s/.lock.%s", dir, _DtCmGetLocalHost());
fd = open(buff, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
if (fd < 0)