Skip to content
Advertisement

Tag: c++

Protect website files on linux hosting server

l have a website that is hosted in linux server, and my root is (/home/MyAccountName). My website allows users to upload there c++/c code, compile, and execute it. The problem is: The executed user’s program will have all the owner permissions (read – write -execute). so if the user’s code is like : system(‘cd / && rm -r MyAccountName’); when

compile error in VeridisBiometricSDK_5.0_Linux sample: MatchingExample

I try to use VeridisBiometricSDK_5.0_Linux which is free Biometric library which has samples I tired to compile MatchingExample by doing exactly what the Readme file said : make MatchingExample.cpp but I have this error result: To compile use: make For example: make AsyncCaptureExample The output will be generated in the bin folder. also this is the VeridisBiometricSDK_5.0 ReadMe file: 1

‘unshare’ does not work as expected in C api

This sequence of commands works: However, the corresponding C program does not work as expected (it seems it does not unmount the previous /proc, and also it provides EBUSY trying to unmount the devpts): I omitted here error checking for readability I think that unshare or unmount does not work as expect: even if it returns zero, it seems that

How to read from serial device in C++

I’m trying to figure out how I should read/write to my Arduino using serial communication in Linux C++. Currently I’m trying to read a response from my Arudino that I “trigger” with I’ve tried looking at the response from my Arduino in my terminal, by using the following command: This is working as it should. Now I want to do

How to cross-compile with SDL 2 from Linux for Windows

I tried to compile a simple C++ program that uses SDL 2 with the mingw-w64-g++ compiler on my Arch Linux (64bits). For this I downloaded SDL2-devel-2.0.4-mingw.tar.gz from here prog.cpp: Makefile: Now making gives the error: Why undefined reference to `SDL_main’ ? Although I specified -lSDL2main ? What did I do wrong? 🙁 Answer Okay, it was because of the main

mono on debian: Could not find file “/srv/www/proj/binroslyncsc.exe”

I try to deploy a ASP NET 4.5 Website written in Visual Studio to a Mono Server. System.IO.FileNotFoundException Could not find file “/srv/www/proj/binroslyncsc.exe”. Description: HTTP 500.Error processing request. What am I doing wrong? Answer Finally I managed it to work. For those, who are searching for a similar solution: In my Apache vHost Configuration I need to add That directive

replacing “”” by empty character

I need to replace ” (ASCII value 34) char by empty character “”. In output, instead of quote i get an “?” question mark character. I tried to use things like: My code: Any ideas how to fix that? For clarification: the strings in mystring are like: “hello” “place ” “school” all with the quotation marks – I Actually need

How to create light weight kernel thread?

When I create a kernel thread (kthread_run), it becomes a new process.(I could see it using top command) . How can I create a light weight kernel thread(like the one we have in user space)? If I am not wrong, kthread_create will eventually call fork() which will call clone() with appropriate configuration to create a new process/lw process. Is it

Advertisement