Notes by voodoo
Displaying keyword search results 1 - 9
Created by voodoo on May 22, 2012 12:26:41
Last update: May 22, 2012 12:26:41
My program core dumped but there was no core file. The problem was that the core file size was 0:
$ ulimit -a
core file size (blocks, -c...
Use ulimit to enable it:
$ sudo bash
# ulimit -c unlimited
Created by voodoo on August 30, 2011 12:30:59
Last update: August 30, 2011 12:32:33
Summarized from The C Book : There are essentially two types of object in C: the internal and external objects. Anything declared outside a function is external; anything inside one, including its formal parameters, is internal. Since no function can be defined inside another, functions are always external. All function declarations implicitly have the extern keyword stuck in front of them, whether or not you put it there. These two declaearions are equivalent:
void some_function(void); extern void some_func... The term linkage is used to describe the accessibility of objects from one file to another. There are three types of linkage: external , internal , and no linkage . Type of linkage Type of object Accessibility external external Across files, througout the program internal external Within...
Created by voodoo on August 14, 2011 15:42:43
Last update: August 14, 2011 15:42:43
When I ran this code snippet with strace :
f = fopen("TZ", "rb");
fseek(f, 0, SEEK_END);
...
I saw ENOTTY error with uClibc :
open("TZ", O_RDONLY|O_LARGEFILE) = 3
ioc...
With the normal gnu libc , there's no such error:
open("TZ", O_RDONLY) = 3
fstat64...
There was no error running the program. But for some reason, uClibc did a ioctl call when it opened a file, and handled it appropriately.
Created by voodoo on August 11, 2011 12:49:55
Last update: August 11, 2011 12:49:55
To diff two directories:
diff dir1 dir2
To diff two directories recursively:
diff -r dir1 dir2
Version of diff :
$ diff -v
diff (GNU diffutils) 2.8.1
Copyrig...
Created by voodoo on March 04, 2011 12:11:33
Last update: April 13, 2011 13:55:13
By default SELinux blocks execstack permission. According to Ulrich Drepper :
"As the name suggests, this error is raised if a program tries to make its stack (or parts thereof) executable with an mprotect call. This should never, ever be necessary. Stack memory is not executable on most OSes these days and this won't change. Executable stack memory is one of the biggest security problems. An execstack error might in fact be most likely raised by malicious code."
You can check if a library/application requires execstack by using the execstack utility:
execstack -q PATHTOPROGRAM
You can try to clean the flag and see if the application still runs:
execstack -c PATHTOPROGRAM
To allow execstack for cc1 :
# grep cc1 /var/log/audit/audit.log | audit2allow ...
Created by voodoo on March 24, 2011 11:20:00
Last update: March 24, 2011 11:23:47
Sometimes you want to disable the UAC because a program written for XP doesn't have the notion of UAC. When running such a program under Windows 7, it silently denies your preference changes.
Enter Control Panel, goto User (Account) Manager.
Click the link "Change User Account Control Settings".
Move the slider to the bottom
Created by voodoo on March 23, 2011 15:57:52
Last update: March 23, 2011 15:57:52
In the "Program search" (or Run) box, enter lusrmgr.msc to bring up the "Local Users and Groups" dialog.
Double click the user name you want to set password never expire.
Created by voodoo on March 03, 2011 21:15:12
Last update: March 03, 2011 21:15:12
I built BartPE on a USB drive but it couldn't see the hard drives. Turned out I needed drivers for the SATA drives on my new PC. These were the steps:
Extract/install the DriverPacks Base program to C:\DPsBase\
Download the latest Mass Storage DriverPack directly to the DriverPacks folder: C:\DPsBase\DriverPacks\
Run C:\DPsBase\DPs_BASE.exe
Detailed instructions: http://driverpacks.net/docs/Miscellaneous%20guides/driverpacks-base-bartpe-guide
Created by voodoo on November 24, 2010 23:43:29
Last update: November 24, 2010 23:43:29
Two of the three PreparedStatement.setBinaryStream methods are not implemented as of version 9.0-801 of the PostgreSQL JDBC driver.
Test program:
import java.io.*;
import java.sql.*;
pub...
Also note that setBinaryStream only works on a bytea column.