repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
tomzox/nxtvepg | epgui/daemon_main.c | <gh_stars>0
/*
* Daemon main entry
*
* Copyright (C) 1999-2011, 2020-2021 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
* published by the Free Software Foundation. You find a copy of this
* license in th... |
ninadbaxi/Hacktoberfest-2021 | C/CircularLinkedListOperations.c | /* c program for linkedlist */
#include<stdio.h>
#include<stdlib.h>
struct Node {
int data;
struct Node *next;
};
struct Node * insert_at_beginning(struct Node *head, int element){
struct Node *node_to_insert = (struct Node *)malloc(sizeof(struct Node));
node_to_insert->data = element;
struct Nod... |
dungru/vwifi | vwifi.c | <reponame>dungru/vwifi
#include <linux/etherdevice.h>
#include <linux/hashtable.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/random.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <net/cfg80211.h>
MODULE_LICENSE("Dual MIT/GPL"... |
mahavirvataliya/react-native-matomo-sdk | ios/RNMatomoSdk/RNMatomoSdk-Bridging-Header.h | <filename>ios/RNMatomoSdk/RNMatomoSdk-Bridging-Header.h
// This is required as per https://facebook.github.io/react-native/docs/native-modules-ios#exporting-swift
#import <React/RCTBridgeModule.h>
|
qt-users-jp/qmlplugins-fluentd | src/fluentd/qfluentd.h | /* Copyright (c) 2012 Silk Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of condi... |
PolarNick239/OpenMeanShift | edison_gpu/thirdparty/cl_utils/include/cl/Platform.h | <reponame>PolarNick239/OpenMeanShift
#pragma once
#include <set>
#include <vector>
#include <memory>
#include "common.h"
namespace cl {
enum PlatformProfile {
FULL_PROFILE,
EMBEDDED_PROFILE,
UNKNOWN_PROFILE,
};
class Platform {
public:
const std::string ... |
PolarNick239/OpenMeanShift | edison_gpu/thirdparty/cl_utils/include/cl/Device.h | #pragma once
#include <set>
#include <vector>
#include <memory>
#include "common.h"
#include "Platform.h"
namespace cl {
enum DeviceType {
CPU_DEVICE = CL_DEVICE_TYPE_CPU,
GPU_DEVICE = CL_DEVICE_TYPE_GPU,
ACCELERATOR_DEVICE = CL_DEVICE_TYPE_ACCELERATOR,
ALL_TYPES = CL_DEVICE_TYP... |
PolarNick239/OpenMeanShift | edison_gpu/src/mean_shift.h | #pragma once
#include "../segm/tdef.h"
#include <vector>
#include <cstddef>
struct PixelPosition {
int row;
int column;
};
class RegionList;
class SegmentedRegions {
public:
SegmentedRegions() : width(0), height(0) {}
void init(size_t width, size_t height, const RegionList ®ionList, const int* ... |
PolarNick239/OpenMeanShift | edison_gpu/thirdparty/cl_utils/include/cl/Engine.h | <reponame>PolarNick239/OpenMeanShift<gh_stars>1-10
#pragma once
#include "common.h"
#include "Platform.h"
#include "Device.h"
#include "Kernel.h"
namespace cl {
class Engine {
public:
const Device_ptr device;
Engine(Device_ptr device) : device(device), initialized(false) { }
~Engine(... |
PolarNick239/OpenMeanShift | edison_gpu/thirdparty/cl_utils/include/cl/Kernel.h | #pragma once
#include "common.h"
#include <memory>
namespace cl {
class Kernel {
public:
Kernel(cl_program program, cl_kernel kernel) : program(program), kernel_(kernel) {
}
void setArg(unsigned int index, size_t size, const void* value);
cl_kernel kernel() const;
pro... |
PolarNick239/OpenMeanShift | edison_gpu/src/timer.h | <reponame>PolarNick239/OpenMeanShift
#pragma once
#ifdef _WIN32
#include <time.h>
#else
#include <sys/time.h>
#endif
class performance_timer {
protected:
#ifdef _WIN32
typedef clock_t timer_type;
#else
typedef struct timeval timer_type;
#endif
double counter_;
timer_type start_;
int is_running_... |
PolarNick239/OpenMeanShift | edison_gpu/thirdparty/cl_utils/include/cl/common.h | #pragma once
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#define clew_STATIC
#include "clew.h"
#include <string>
#include <iostream>
#define VERBOSE 0
#if VERBOSE
#define verbose_cout std::cout
#define verbose_cerr std::cerr
#else
#define verbose_cout if (false) std::cout
#define verbose_cerr if (fal... |
olliiiver/lexin | components/esp_sr/speech_command_recognition/include/mn_process_commands.h | #pragma once
#define SPEECH_COMMANDS_NUM CONFIG_SPEECH_COMMANDS_NUM
#if CONFIG_SR_CHINESE
#define MN_SPEECH_COMMAND_ID0 CONFIG_CN_SPEECH_COMMAND_ID0
#define MN_SPEECH_COMMAND_ID1 CONFIG_CN_SPEECH_COMMAND_ID1
#define MN_SPEECH_COMMAND_ID2 CONFIG_CN_SPEECH_COMMAND_ID2
#define MN_SPEECH_COMMAND_ID3 CONFIG_CN_SPEEC... |
anvi10/CircleList-GUI | Demo/plot.h | <reponame>anvi10/CircleList-GUI
#ifndef PLOT
#define PLOT
#include <GL/glut.h>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
inline int sign (int i)
{
return i > 0 ? 1 : (i == 0 ? 0 : -1);
}
class Point {
int x, y;
public:
Point (int x, int y) : x(x), y(y) {}
int getX () cons... |
anvi10/CircleList-GUI | work/clist.h | <reponame>anvi10/CircleList-GUI
#include "point.h"
#include <stdlib.h>
#include <stdio.h>
typedef Point Elem;
class CNode{
private:
Elem elem;
CNode * next;
CNode * prev;
friend class CircleList;
};
class CircleList {
public:
CircleList();
~CircleList();
bool empty() const;
const Elem& front() const;
const ... |
anvi10/CircleList-GUI | work/point.h | <gh_stars>0
#ifndef POINT
#define POINT
class Point {
int x, y;
public:
Point (int x, int y) : x(x), y(y) {}
Point () : x(-1), y(-1) {}
int getX () const { return x; }
int getY () const { return y; }
bool operator< (const Point &a) const { return x < a.x || x == a.x && y < a.y; }
Point operator- (const ... |
anvi10/CircleList-GUI | work/plot.h | #ifndef PLOT
#define PLOT
#include <GL/glut.h>
#include <iostream>
#include <fstream>
#include <vector>
#include "point.h"
#include "clist.h"
using namespace std;
typedef CircleList Points;
void graphicsInit (int argc, char **argv, int wsize, int linewidth,
float pointsize);
void menuInit ();
void menu (int... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/kompat/kompat.c | <gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundati... |
AkihiroSuda/runrootless | proot/PRoot/src/path/binding.h | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/loader/assembly-x86_64.h | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/exit.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-51943658.c | <gh_stars>10-100
#include <unistd.h> /* syscall(2), */
#include <stdio.h> /* perror(3), fprintf(3), */
#include <limits.h> /* PATH_MAX, */
#include <stdlib.h> /* exit(3), */
#include <fcntl.h> /* openat(2), */
int main(void)
{
int dir_fd;
int dir_fd1;
int dir_fd2;
ssize_t status;
char path1[PATH_MAX];
char path... |
AkihiroSuda/runrootless | proot/PRoot/src/path/binding.c | <filename>proot/PRoot/src/path/binding.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by th... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/enter.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-16573e73.c | #include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char **ignored)
{
char *const argv[] = { "true", NULL};
char *const envp[] = { NULL };
pid_t pid;
int status;
pid = (argc <= 1 ? vfork() : fork());
switch (pid) {
case -1:
exit(EXIT_FAILURE);
case 0: /*... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/seccomp.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/ptrace-2.c | <filename>proot/PRoot/tests/ptrace-2.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the ... |
AkihiroSuda/runrootless | proot/PRoot/tests/readdir.c | #include <sys/types.h>
#include <dirent.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
int main(int argc, char *argv[])
{
struct dirent *dirents;
DIR *dir;
int status;
int i;
for (i = 1; i < argc; i++) {
dir = opendir(argv[i]);
if (dir == NULL) {
perror("opendir(3)");
exit(EXIT_FAILURE);... |
AkihiroSuda/runrootless | proot/PRoot/tests/puts_proc_self_exe.c | <reponame>AkihiroSuda/runrootless
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
char path[PATH_MAX];
ssize_t status;
status = readlink("/proc/self/exe", path, PATH_MAX - 1);
if (status < 0 || status >= PATH_MAX)
exit(EXIT_FAILURE);
path[status] = '\0';
puts(p... |
AkihiroSuda/runrootless | proot/PRoot/src/tracee/mem.h | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/path/path.h | <reponame>AkihiroSuda/runrootless<filename>proot/PRoot/src/path/path.h<gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GN... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/extension.c | <filename>proot/PRoot/src/extension/extension.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* publishe... |
AkihiroSuda/runrootless | proot/PRoot/src/cli/care.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of CARE.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version... |
AkihiroSuda/runrootless | proot/PRoot/src/ptrace/ptrace.c | <reponame>AkihiroSuda/runrootless<filename>proot/PRoot/src/ptrace/ptrace.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Pu... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-bdc90417.c | #define _GNU_SOURCE /* See feature_test_macros(7) */
#include <unistd.h> /* execv(3), syscall(2), */
#include <sys/syscall.h> /* SYS_*, */
#include <sys/time.h> /* *rlimit(2), */
#include <sys/resource.h> /* *rlimit(2), */
#include <stdlib.h> /* EXIT_*, exit(3), */
int main(int argc, char *argv[... |
AkihiroSuda/runrootless | proot/PRoot/src/arch.h | <gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundati... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/fake_id0/fake_id0.c | <reponame>AkihiroSuda/runrootless
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free ... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-79cf6614.c | /*
* Submitted-by: <NAME> <<EMAIL>>
* Ref.: https://groups.google.com/d/msg/proot_me/4WbUndy-aXI/lmKiDfoIK_IJ
*/
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
int main()
{
int status;
struct timeval times[2] = {
{.tv_sec = 52353, .tv_usec = 0},
{ .tv_sec = 52353, .tv_usec =... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/care/archive.h | <filename>proot/PRoot/src/extension/care/archive.h
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* publi... |
AkihiroSuda/runrootless | proot/PRoot/src/tracee/tracee.h | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/portmap/portmap.h | /*
* Copyright (C) 2016 <NAME>
*/
#ifndef PORTMAP_H
#define PORTMAP_H
#include "extension/extension.h"
#define PORTMAP_SIZE 4096 /* must be a power of 2 */
#define PORTMAP_DEFAULT_VALUE 0 /* default value that indicates an unused entry */
#define PORTMAP_VERBOSITY 1
typedef struct PortMapEntry {
uint16_t port_... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-66666666.c | <reponame>AkihiroSuda/runrootless<gh_stars>10-100
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#include <signal.h>
#include <errno.h>
bool sigtrap_received = false;
void handler(int signo)
{
if (signo == SIGTRAP)
sigtrap_received = true;
}
int main()
{
struc... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/care/final.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-1c68c218.c | <reponame>AkihiroSuda/runrootless
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
int status;
char *path;
path = tmpnam(NULL);
status = symlink(path, path);
if (status < 0)
exit(EXIT_FAILURE);
status = fchownat(AT_FDCWD, path, getuid(), getgid(), 0);
if (status >= ... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-9c07fad8.c | #include <linux/unistd.h>
int check = 0;
static void __attribute__((constructor)) init(void)
{
if (check > 0)
_exit(1);
check++;
}
int main(void)
{
return 0;
}
|
AkihiroSuda/runrootless | proot/PRoot/tests/test-c5a7a0f0.c | <filename>proot/PRoot/tests/test-c5a7a0f0.c
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
static void *setuid_124(void *unused)
{
int status;
status = setuid(124);
if (status < 0) {
perror("setuid");
pthread_exit((void *)-1);
}
if (getuid() != 124) {
... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-ssssssss.c | <gh_stars>10-100
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <strings.h>
#include <stdio.h>
#include <assert.h>
int main()
{
struct sockaddr_un sockaddr;
so... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-5bed7143.c | <gh_stars>10-100
#define _GNU_SOURCE
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#define TEMPLATE "/tmp/proot-test-5bed7143-XXXXXX"
#define COOKIE1 "2fde3df3558fa30bec1b8ebad42df20f... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/care/extract.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/sysnums-sh4.h | #include "syscall/sysnum.h"
static const Sysnum sysnums_sh4[] = {
[ 0 ] = PR_restart_syscall,
[ 1 ] = PR_exit,
[ 2 ] = PR_fork,
[ 3 ] = PR_read,
[ 4 ] = PR_write,
[ 5 ] = PR_open,
[ 6 ] = PR_close,
[ 7 ] = PR_waitpid,
[ 8 ] = PR_creat,
[ 9 ] = PR_link,
[ 10 ] = PR_unlink,
[ 11 ] = PR_execve,
[ 12 ] = PR_c... |
AkihiroSuda/runrootless | proot/PRoot/tests/exec.c | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char *argv[], char *envp[])
{
if (argc < 2) {
puts("not enough parameter: filename argv[0] argv[1] ... argv[n]");
exit(EXIT_FAILURE);
}
execve(argv[1], &argv[2], envp);
perror("execve");
exit(EXIT_FAILURE);
}
|
AkihiroSuda/runrootless | proot/PRoot/src/path/proc.h | <reponame>AkihiroSuda/runrootless<filename>proot/PRoot/src/path/proc.h<gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GN... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/enter.c | <reponame>AkihiroSuda/runrootless<gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* publis... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-af062114.c | #include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
int main(void)
{
int fd;
int status;
bool stop = false;
fd = open("/proc/self/cmdline", O_RDONLY);
if (fd < 0) {
perror("open()");
exit(EXIT_FAILURE);
}
do {
char buffer;
status = read(fd, &buffer, 1);
... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-44444444.c | <gh_stars>10-100
#include <unistd.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char buffer[2 * PATH_MAX];
if (!getcwd(buffer, sizeof(buffer))) {
perror("getcwd");
exit(EXIT_FAILURE);
}
if (readlink("/bin/abs-true", buffer, sizeof(buffer)) < 0) {
perror("readlink");
exit(... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-nnnnnnnn.c | #include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdlib.h>
#include <strings.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
int main()
{
const char *sockname = "/test-nnnnnnnn-socket";
struct sockaddr_un sockaddr;
socklen_t socklen;
mode_t mask;
int ... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/syscall.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/exit.c | <filename>proot/PRoot/src/syscall/exit.c<gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
*... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-25069c12.c | <filename>proot/PRoot/tests/test-25069c12.c<gh_stars>10-100
#include <unistd.h> /* execve(2), */
#include <stdlib.h> /* exit(3), */
#include <string.h> /* strcmp(3), */
int main(int argc, char *argv[])
{
char *void_array[] = { NULL };
if (argc == 0)
exit(EXIT_SUCCESS);
execve("/proc/self/exe", void_array, void_... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/heap.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/fork-wait.c | #include <stdlib.h> /* exit(3), */
#include <unistd.h> /* fork(2), sleep(3), */
#include <sys/types.h> /* wait(2), */
#include <sys/wait.h> /* wait(2), */
int main(int argc, char *argv[])
{
int child_status;
int status;
switch (fork()) {
case -1:
exit(EXIT_FAILURE);
case 0: /* Child */
argc > 1 && sleep(2)... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/execve.h | <filename>proot/PRoot/src/execve/execve.h
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by t... |
AkihiroSuda/runrootless | proot/PRoot/src/ptrace/wait.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-1ffc8309.c | <filename>proot/PRoot/tests/test-1ffc8309.c
#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
int main()
{
int fds[2];
int status;
uint8_t buffer;
status = pipe2(fds, O_NONBLOCK);
if (status < 0) {
perror("pipe2");
exit(EX... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-0cf405b0.c | <reponame>AkihiroSuda/runrootless<filename>proot/PRoot/tests/test-0cf405b0.c
#include <unistd.h> /* execlp(2), */
#include <stdlib.h> /* exit(3), */
#include <string.h> /* strcmp(3), */
int main(int argc, char *argv[])
{
if (argc == 0) //strcmp(argv[0], "/proc/self/exe") == 0)
exit(EXIT_SUCCESS);
execlp("/proc/se... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/elf.h | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-305ae31d.c | #include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
int main()
{
int fd;
int fd_dir;
int fd_file;
char path[64]; /* 64 > sizeof("/proc//fd/") + 2 * sizeof(#ULONG_MAX) */
int status;
fd_dir = open("/bin", O_RDONLY);
if (fd... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-ptrace00.c | <filename>proot/PRoot/tests/test-ptrace00.c
/* Extracted from strace-4.8/strace.c:test_ptrace_setoptions_for_all. */
#include <sys/ptrace.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <stdbool.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(voi... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/socket.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/tracee/reg.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/portmap/map.c | <reponame>AkihiroSuda/runrootless<gh_stars>10-100
/*
* Copyright (C) 2016 <NAME>
*/
#include <arpa/inet.h> /* inet_ntop */
#include "cli/note.h"
#include "extension/portmap/portmap.h"
/**
* Set all entries empty by setting their key and values to PORTMAP_DEFAULT_VALUE.
* The table mask is used in get_index ... |
AkihiroSuda/runrootless | proot/PRoot/src/cli/proot.h | /* This file is automatically generated from the documentation. EDIT AT YOUR OWN RISK. */
#ifndef PROOT_CLI_H
#define PROOT_CLI_H
#include "cli/cli.h"
#ifndef VERSION
#define VERSION "5.1.0"
#endif
static const char *recommended_bindings[] = {
"/etc/host.conf",
"/etc/hosts",
"/etc/hosts.equiv",
"/etc/mtab",
"/... |
AkihiroSuda/runrootless | proot/PRoot/src/loader/loader.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/sysnum.c | <reponame>AkihiroSuda/runrootless
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free ... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-33333333.c | /* Check a child is traced even if its parent doesn't call wait(2).
*
* Reported-by: <NAME> <<EMAIL>>
* on Ubuntu 11.10 x86_64
*/
#include <stdlib.h> /* exit(3), */
#include <unistd.h> /* fork(2), */
int main(void)
{
switch (fork()) {
case -1:
exit(EXIT_FAILURE);
case 0: /* Child: XXX */
sle... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-fa205b56.c | <reponame>AkihiroSuda/runrootless<filename>proot/PRoot/tests/test-fa205b56.c
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define NUM_THREADS 5
void *exec(void *id)
{
char *const argv[] = { "true", NULL };
if ((long) id == NUM_THREADS - 1)
execve("/usr/bin/true", argv, NULL);
... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/auxv.c | <filename>proot/PRoot/src/execve/auxv.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-iiiiiiii.c | <reponame>AkihiroSuda/runrootless
#include <fcntl.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
int result;
int status;
char *path;
int fd;
path = strdup("/tmp/proot-test-iiiiiiii-XXXXXX");
if (path == NULL) {
result = 125;
goto end;
}
mktemp(pat... |
AkihiroSuda/runrootless | proot/PRoot/src/tracee/tracee.c | <filename>proot/PRoot/src/tracee/tracee.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by t... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-88888888.c | <reponame>AkihiroSuda/runrootless
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
int main()
{
int fd;
fd = open("/bin/true", O_RDONLY);
if (fd < 0) {
perror(NULL);
exit(EXIT_FAILURE);
}
close(fd);
fd = open("/bin... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/chain.c | <gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundati... |
AkihiroSuda/runrootless | proot/PRoot/src/ptrace/user.c | <gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundati... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/portmap/portmap.c | /*
* Copyright (C) 2016 <NAME>
*/
#include <stdint.h> /* intptr_t, */
#include <stdlib.h> /* strtoul(3), */
#include <sys/un.h> /* strncpy */
#include <sys/socket.h> /* AF_UNIX, AF_INET */
#include <arpa/inet.h> /* inet_ntop */
#include <linux/net.h> /* SYS_*, */
#include "cli/no... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/care/care.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/path/canon.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/syscall/rlimit.c | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/aoxp.c | <reponame>AkihiroSuda/runrootless<filename>proot/PRoot/src/execve/aoxp.c
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Publ... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-kkkkkkkk.c | #include <unistd.h> /* syscall(2), sysconf(3), */
#include <sys/syscall.h> /* SYS_brk, */
#include <stdio.h> /* puts(3), */
#include <stdlib.h> /* exit(3), EXIT_*, */
#include <stdint.h> /* uint*_t, */
#include <sys/mman.h> /* mmap(2), MAP_*, */
#include <string.h>... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-xxxxxxxx.c | <filename>proot/PRoot/tests/test-xxxxxxxx.c
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/stat.h>
extern char *environ[];
#define CONTENT "this isn't an executable"
int main(void)
{
char * const argv[] = { "argv0", "argv1", "argv2", NULL };
char tmp_name[] = "/tmp/proo... |
AkihiroSuda/runrootless | proot/PRoot/src/cli/care.h | /* This file is automatically generated from the documentation. EDIT AT YOUR OWN RISK. */
#ifndef CARE_CLI_H
#define CARE_CLI_H
#include "cli/cli.h"
#ifndef VERSION
#define VERSION "2.2"
#endif
#define CARE_MAX_SIZE 1024
static char const *default_concealed_paths[] = {
"$HOME",
"/tmp",
NULL,
};
static char con... |
AkihiroSuda/runrootless | proot/PRoot/tests/pwd.c | #include <unistd.h> /* syscall(2), */
#include <stdio.h> /* perror(3), */
#include <limits.h> /* PATH_MAX, */
#include <stdlib.h> /* exit(3), */
#include <sys/syscall.h> /* SYS_getcwd, */
int main(void)
{
char path[PATH_MAX];
int status;
status = syscall(SYS_getcwd, path, PATH_MAX);
if (status < 0) {
perror("... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-fdf487a0.c | #include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
int fd;
fd = openat(0, "foo", O_RDONLY);
if (fd >= 0 || errno != ENOTDIR) {
printf("1. %d %d\n", fd, (int) errno);
exit(EXIT_FAILURE);
}
fd = openat(0, "", O_RDONLY);
if (f... |
AkihiroSuda/runrootless | proot/PRoot/src/extension/extension.h | <reponame>AkihiroSuda/runrootless
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free ... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-d2175fc4.c | <gh_stars>10-100
#include <unistd.h> /* syscall(2), */
#include <stdio.h> /* perror(3), fprintf(3), */
#include <limits.h> /* PATH_MAX, */
#include <stdlib.h> /* exit(3), */
#include <strings.h> /* bzero(3), */
#include <sys/syscall.h> /* SYS_readlink, */
#include <fcntl.h> /* AT_FDCWD */
int main(int argc, char *arg... |
AkihiroSuda/runrootless | proot/PRoot/src/execve/shebang.c | <gh_stars>10-100
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundati... |
AkihiroSuda/runrootless | proot/PRoot/src/ptrace/user.h | /* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either versio... |
AkihiroSuda/runrootless | proot/PRoot/src/.check_process_vm.c | <filename>proot/PRoot/src/.check_process_vm.c<gh_stars>10-100
#include <sys/uio.h>
#include <stdlib.h>
int main(void)
{
return process_vm_readv(0, NULL, 0, NULL, 0, 0)
+ process_vm_writev(0, NULL, 0, NULL, 0, 0);
}
|
AkihiroSuda/runrootless | proot/PRoot/tests/test-c47aeb7d.c | #include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
void *print_hello(void *id)
{
pthread_exit(id);
}
int main(void)
{
const int nb_threads = 10;
pthread_t threads[nb_threads];
int status;
long i;
for(i = 0; i < nb_threads; i++) {
status = pthread_create(&threads[i], NULL, print_h... |
AkihiroSuda/runrootless | proot/PRoot/src/cli/note.c | <reponame>AkihiroSuda/runrootless
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*-
*
* This file is part of PRoot.
*
* Copyright (C) 2015 STMicroelectronics
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free ... |
AkihiroSuda/runrootless | proot/PRoot/tests/test-ptrace01.c | #include <unistd.h> /* fork(2), */
#include <stdio.h> /* perror(3), fprintf(3), */
#include <stdlib.h> /* exit(3), */
#include <sys/ptrace.h> /* ptrace(2), */
#include <sys/types.h> /* waitpid(2), */
#include <sys/wait.h> /* waitpid(2), */
int main(void)
{
int child_status, status;
pid_t pid;
pid =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.