System call with root level privileges
Hi, I needed my application to change the hardware date & time with a system call to "hwclock". Unfortunately, "hwclock" requires a root / superuser level access. I could make the machine to always log with root though I think it will be a bad practice. I just needed this code to work:
Can anybody help me please?
std::string command="hwclock --set --date=";
Date input from the user.
dateInput="\'..........\'"; //........... == user input