src/main.c
void unlock_dir()
{
    // Can read, can write and can execute.
    char mode[4] = "0777";
    int i = strtol(mode, 0, 8);
    if (chmod(intranet_dir, i) == 0)
    {
        openlog("Assignment1", LOG_PID | LOG_CONS, LOG_USER);
        syslog(LOG_INFO, "Directory unlocked");
        closelog();
    }
    else
    {
        openlog("Assignment1", LOG_PID | LOG_CONS, LOG_USER);
        syslog(LOG_INFO, "Error unlocking directory");
        closelog();
    }
}
//unlocks directoy after update and backup is done.
unlocks directoy after update and backup is done.
unlocks directoy after update and backup is done .
void unlock_dir()
{
    char mode[4] = "0777";
    int i = strtol(mode, 0, 8);
    if (chmod(intranet_dir, i) == 0)
    {
        openlog("Assignment1", LOG_PID | LOG_CONS, LOG_USER);
        syslog(LOG_INFO, "Directory unlocked");
        closelog();
    }
    else
    {
        openlog("Assignment1", LOG_PID | LOG_CONS, LOG_USER);
        syslog(LOG_INFO, "Error unlocking directory");
        closelog();
    }
}
void unlock_dir ( ) { char mode [ 4 ] = " " ; int i = strtol ( mode , 0 , 8 ) ; if ( chmod ( intranet_dir , i ) == 0 ) { openlog ( " " , LOG_PID | LOG_CONS , LOG_USER ) ; syslog ( LOG_INFO , " " ) ; closelog ( ) ; } else { openlog ( " " , LOG_PID | LOG_CONS , LOG_USER ) ; syslog ( LOG_INFO , " " ) ; closelog ( ) ; } }
unlocks directoy after update and backup is done.
unlocks directoy after update and backup is done .
// Can read, can write and can execute.