i am supposed to create a conf file in /etc/rsyslog.d ,restart rsyslog and when pgm exits it should remove the conf file.But in c i cannot create file in /etc/rsyslog.d/ it is not prompting for password like using popen() which is used execute a command through shell.I also cannot run the program as sudo since this is a part of the bigger module which runs like a normal application.So could someone please help me find a solution
Thanks